Adding paths to sys.path permanently, and another problem...

Amir Dekel adekel at ort.org.il
Thu Dec 16 16:29:36 EST 2004


Jeff Shannon wrote:

> 
> Not only can one modify the environment variable PYTHONPATH, but one can 
> also use a .pth file.  Under windows, when the interpreter starts up it 
> will search its default sys.path for any files with extension .pth; if 
> it finds any, then it will use each line of those files as a directory 
> to add to sys.path.  Thus, if you drop a mymodule.pth file in 
> site-packages, which contains a list of the directories you're 
> interested in, sys.path will automatically be amended for you every time 
> Python starts.
> 

Works great! So simple, yet people get so confused...
Do you have a solution for my other problem?

Thanks,
Amir



More information about the Python-list mailing list