setting pythonpath on Windows NT

Mark Hadfield m.hadfield at niwa.cri.nz
Thu Oct 5 01:00:32 EDT 2000


"Grant Griffin" <g2 at seebelow.org> wrote in message
news:39DB997D.959281FD at seebelow.org...
> Hi Gang,
>
> I've been trying to set my PYTHONPATH on Windows NT for my installation
> of 2.0.  Basically, I just want to add a certain directory to my
> PYTHONPATH.  After a fair amount of head-banging, I'm ready to ask you
> folks for a little help:
>
> 1.  I added the directory on to the PYTHONPATH variable using NT's
> Registry Editor.  However, it then didn't show up in the sys.path list.
> I restarted the computer, just in case that was an issue, but it _still_
> didn't show up.  The sys.path list  matched the Registry's original
> PYTHONPATH, so the Registry entry seems to be the source of it.  But
> that leaves me stumped as to what basis Python discriminates against my
> addition.

Me too, but the registry's definitely the way to go. Changes made by regedit
take effect immediately and should be picked up by Python next time it is
started. Perhaps you got the format wrong. Here is what the relevant section
of my registry says (exported by regedit). Hand-entered additions are for
HTMLgen and Site; the rest were put in by installers for Python and Win32
extensions...

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath]

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath\HTMLgen]
@="C:\\Program Files\\Python\\HTMLgen"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath\Pythonwin]
@="C:\\Program Files\\Python\\Python20\\Pythonwin"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath\Site]
@="C:\\Program Files\\Python\\Site"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath\win32]
@="C:\\Program Files\\Python\\Python20\\win32;C:\\Program
Files\\Python\\Python20\\win32\\lib"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath\win32com]
@="C:\\Program Files\\Python\\Python20"

---
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

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!






More information about the Python-list mailing list