I currently do this:
PYTHONPATH=/home/$USER:/home/$USER/respository:/home/$USER/repository/python-stuff
How can I make it so that the PYTHONPATH can include everything subdirectory?
PYTHONPATH = /home/$USER/....and-all-subdirectories
|
I currently do this:
How can I make it so that the PYTHONPATH can include everything subdirectory?
| |||
|
feedback
|
|
That's not how PYTHONPATH works; PYTHONPATH treats its search path differently from shell PATH. Let's say I do this:
This will work, in Python (
However, subdirectories are treated as packages when
To get at something in that subdirectory, this would work:
To roll a solution where every subdirectory in your PYTHONPATH is added, you need to explicitly add every folder to PYTHONPATH or | |||||||||
feedback
|
|
That's not how environment PATH variables work - you give it the top-level directory and it's up to the application to recurse the directory tree if it needs to. | |||||
feedback
|