How do I add permanently to Pythons sys.path?
Christian Heimes
lists at cheimes.de
Tue Sep 16 11:56:19 EDT 2008
Python wrote:
> a temp solution is to append it to that list:
>
> sys.path.append('C:/Python25/Progs/')
>
> a permanent solution is to add it to the environment variable
> (no idea where to set this in windows)
> $PYTHONPATH = "/C:/Python25/Progs/"
Don't append a / or \!Use "C:/Python25/Progs" instead of
"C:/Python25/Progs/". The trailing slash causes trouble on Windows.
The reason for the trouble is design decision from Microsoft. The low
level stat() syscall returns an error for "C:\\Python25\\Progs\\" but it
returns success for "C:\\Python25\\Progs".
Christian
More information about the Python-list
mailing list