I have a folder called Python Modules
which contains single-file modules I've made that I often use, for example one called mytimer.py
. I added Python Modules
to my Windows PYTHONPATH
environment variable and I import it in other files with import mytimer
.
But now I would like to put mytimer in a git repo, so I would need to put it in a folder (I don't want all my modules in a single repo) like Python Modules\mytimer\mytimer.py
.
And I want to do this for many of the single-file modules in that folder.
Is there any way I can do this while still being able to import like import mytimer
rather than import mytimer.mytimer
, other than adding each folder individually to the PYTHONPATH
?