On 6/11/2019 at 10:11 PM, Slottr said:
You'll need the py file it in the same project folder
False. Its most user friendly for beginners thats true but you can import files from anywhere. You can even import folders. Actually most modules are folders that have python files in them. I will show example of json module.
Bit of explaning. For someone who plans to advance in python.
When you create __init__.py file in folder, you are telling python that folder is module.
For example here is json module.
And if we import json, and do dir(json) we will get content of that folder
Oher stuff that we got in dir are located in tools.py and __init__.py
for example here is dumps code: http://prntscr.com/o21so0
There is a lot of flexibility with designin and organising objects, functions, modules with python.
test it out, have fun. Cheers.