How to Import External Python Files and Functions Into Your Main Program!

preview_player
Показать описание
This brief tutorial covers how to reference and import outside functions from .py python files in your local program directory! This is a super useful tool for creating large scale programs where subprograms and subfuctions and separated out into easy to read containers. We also cover how to alias those external files to shorten the name you need to access them.

If there's something else you want to see in a future video or a question you have on anything programming related, just let us know about it in the comments!

Thanks for watching, leave a like if you found it useful and subscribe to the channel for tons of new content coming every week!

Рекомендации по теме
Комментарии
Автор

Having problems navigating from main program to external functions file. Invariably, I get the "name "variable' is not defined when I execute the main program. I normally want to build lists in the function and pass it on to main. I declare the list in the function and assign the list as a global variable. Seems like I'm not defining the scope of the variables correctly. Could use your help. Thanks.

gobigred
Автор

Why don't you use something like this?

import useless_programs as bad
import useful_programs as good

christophkrapp
Автор

a useless comment. Ur font on U terminal is way to smalll for me to follow, I need a magnifier to see it.

rcustodian
visit shbcf.ru