Module Search Path?

Jason Orendorff jason at jorendorff.com
Fri Mar 8 11:40:19 EST 2002


brobbins333 at shaw.ca wrote:
> I want to store the modules I have written in their own directory.
> When I add it to the search path with sys.path.append the changes are
> made for one session only. How can I make permanent changes to the
> search path? I am using ActivePython 2.1 (PythonWin) in Win98.

Find the directory named (python21)\Lib\site-packages .
Make a new directory in there, and put your modules in it.
Make a file named "mymodules.pth" under site-packages 
that has just one line, the name of the directory you created.

Details:
  http://www.python.org/doc/current/lib/module-site.html

## Jason Orendorff    http://www.jorendorff.com/





More information about the Python-list mailing list