Stow and Python

Alex Martelli aleax at aleax.it
Wed Oct 2 06:00:47 EDT 2002


Hamish Lawson wrote:

> Jason Petrone wrote:
> 
>> If you just want to add some extra location to the default module path,
>> you can also add os.path.append('/tools/bar/') to site.py in the python
>> lib directory.
> 
> Or if you prefer not to modify your Python distribution's files, do
> the sys.path.append('/tools/bar/') in
> lib/site-packages/sitecustomize.py (create if necessary).

Yet another way to append directories to your path is to list the
directories, one per line, in files with extension ".pth" to place
in the site-packages directory.  You can use absolute paths there,
as well as paths relative to the site-packages directory.


Alex




More information about the Python-list mailing list