[Python-Dev] Finally fix installer to add Python to %PATH% on Windows

Christian Heimes lists at cheimes.de
Fri Jan 28 21:34:05 CET 2011

Am 28.01.2011 20:29, schrieb Raymond Hettinger:
> At the very least, we should add some prominent instructions for getting the command line version up and running.

/me pops out of Guido's time machine and says: "execute

I'm -1 on adding Python to %PATH%. The private MSVCRT DLLs may lead to
unexpected side effects and it doesn't scale at all. What about people
with more than one Python installation? I suggest that we add a single
user specific directory or a global directory to %PATH% for all
installations. Then the Python installer or 3rd party modules can drop
executables like python3.3.exe or plip-3.3.exe into this directory. A
.bat file won't do good because .bat files must be called with "call
python33.bat" from another .bat file or the first one gets terminated.

We can even use a single and simple executable as template for all tasks:

 * get registry key from resource section of the executable
 * use the registry key to lookup the location and name of pythonXX.dll
 * load DLL
 * get optional dotted module name for resource section
 * either fire up interpreter as shell, with **argv or -m
dotted.module.name **argv

Done ;)


More information about the Python-Dev mailing list