How to extend sys.path on Win9x permanently?
Mark Hadfield
m.hadfield at niwa.cri.nz
Mon Jan 29 18:44:51 EST 2001
> (1) I'd like Python.exe/DOS AND Python in PythonWin to start
> up with an extended sys.path, having my own lib added, as if a
> sys.path.append('c:\\mylib') had already been performed.
> How can I add the extra path permanently?
Edit the registry--see below
> (2) Here's what sys.path is on my machine. Where is this defined?
> Registry?
Yes. Take a look at the registry branch rooted at (for version 2.0)
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath
You should be able to deduce how it works.
> (3) I'd hate having to put something like "set $PYTHONPATH=..." into
> AUTOSTART.BAT, since DOS environment space is very limited.
No need.
---
Mark Hadfield
m.hadfield at niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
More information about the Python-list
mailing list