Can somebody kill getpathp for me?

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Fri Mar 1 00:27:49 EST 2002


In the PC subdir of the Python-2.1.2 build directory is a module
called getpathp.c, which sets up the initial sys.path value.  It
is well known by Python programmers on Windows that the sys.path
initialization includes directories plucked from special registry
keys... unless you are using the PythonWare version.

I thought, great, I can use this (the PythonWare version) to create 
Python runnables on CD-ROM; but now I discover a fly in the ointment.
If the computer already has an installed Python interpreter, the 
paths set in the registry are added, and BEFORE the paths from the
PythonWare PYROOT variable are added.

Gah.

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.  Ideally it should still apply
the paths from PYROOT (basically in this case it must).

Can anyone help with this?  I am experienced in Linux programming
but a novice at Win32, and I don't have MSVC in any event.  (Yeah,
I know, you can build Python with MinGW32, but it's a PITA.)

Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net






More information about the Python-list mailing list