Make Python find your modules
To reuse your code is very handy if you use this tecnique. You can create a personal folder on your pc with all your scripts and tell Python to search for them with python -m yourfile in any folder you are on your pc, so that you don’t need to have the script in the folder you are in that moment.
- open the cmd
- start python
- import sys
- print(sys.path)
- look where the site-packages folder is
- create a file.path with the folder’s path in it
In the following video there is the explanation of what I just wrote.