Can somebody kill getpathp for me?
mhammond at skippinet.com.au
Sun Mar 3 07:43:15 CET 2002
Tim Peters wrote:
> [Chris Gonnerman]
> Have you tried setting PYTHONHOME? If, e.g., I set PYTHONHOME to \Python22,
> then execute python while *in* my \Python21 directory (these both referring
> to PythonLabs distros), then Python 2.1.2 comes up with sys.path pointing
> entirely at Python 2.2 directories. This is insane, but shows that
> PYTHONHOME works the way getpathp.c says it works.
insane by design ;) PYTHONHOME was supposed to be a global override.
Didn't someone promise to document all this once? <wink>
>>What I want is a version of either python.exe or python21.dll
>>(whichever contains the offending getpathp.c module) with the
>>registry-probing code disabled.
> If that's what you really want, you'll have to edit getpathp.c and compile
> your own Python.
Or, use MSVC or some other resource editor to change the single string
resource in the compiled Pythonxx.DLL (ie, no need to rebuild the DLL).
This will cause a different registry key to be used (by the core, and
also by extensions that are registry aware).
More information about the Python-list