Python(Path) Question, Number Two :)

Stephen Hansen stephen at cerebralmaelstrom.com
Thu May 18 04:38:23 EDT 2000


Okay, now this is more of a curious question then anything else. After
building (w/ VC++6.0 in Win98) the Python DLL/.exe file, which ends up
in PCBuild, I ran the python.exe to test a couple things out.. I was
wondering if it made the path/etc entries into the registry
(E.g. 'default' values).. It doesn't, I see :)

Anyways. I was expecting a failure when I attempted to import modules,
since my peeking at the source indicated (in, e.g., config.h) that the
default pythonpath was being set to .\lib, .\others.. but Python
(smartly?) found the lib in ..\lib.

Now the actual question -- why? :) Where does Python search for its
library, and what does it ask where to find it? My understanding
(flawed?) is that the environment variable PYTHONPATH overrides the
registry, which overrides those hardcoded values...

What's the exact registry key that it looks for the Pythonpath info?
\Software\Python\PythonCore\(MS_DLL_ID String from python_nt.c)
\Pythonpath?

Thanks.

--Stephen


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list