PYTHONPATH

Chris Rebert clp2 at rebertia.com
Fri Apr 15 11:21:12 CEST 2011


On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila <akabaila at pcug.org.au> wrote:
> Hi,
>
> An elementary question that is bugging me, regarding sys.path
> values.sys.path can be altered easily, but the changes last for
> the current session only. I would like the changes to stay for
> several sessions.  Is PYTHONPATH a system variable that sets the
> path for several sessions and if so, where in the system is it?

It is an environment variable:
http://en.wikipedia.org/wiki/Environment_variable

Alternatively, you can use a .pth file to add directories to the
module search path:
http://docs.python.org/library/site.html

Cheers,
Chris



More information about the Python-list mailing list