how to change sys.path?

John Salerno johnjsal at NOSPAMgmail.com
Tue May 23 16:21:10 EDT 2006


Jarek Zgoda wrote:
> John Salerno napisał(a):
> 
>>> yes, I mean I want change the sys.path value and save it for next
>>> using.
>>> I can change the value of sys.path, but I can't "save" it permanently.
>>> There is no python_path environment on my pc, what the relationship
>>> between it and the sys.path?
>> In Windows, at least, you can create the PYTHONPATH variable and assign
>> to it the paths of the directories you want Python to check for when
>> running a script.
> 
> Setting Windows envvar by changing os.environ dict will work only for
> processes running in the same environment (i.e. in the same shell session).
> 

I meant actually adding the PYTHONPATH variable to the environment 
variables list.



More information about the Python-list mailing list