I want to keep my main code short, and very organized. Is there any way I can call code from another script, similar to the way a PHP include is used in a HTML document?
My main script is 'New Project.py' and I want to pull in 'zzz.py'
wtf bruh, i got so excited reading your journey thread i actually thought about going back to coding again.
- have the two files at the same directory. [ optional ]
+ import filename.py
- have the __init__.py file present if they are not on the same directory
+ import filename.py
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.