Why does Python never add itself to the Windows path?

Thomas Heller theller at ctypes.org
Tue Jan 2 12:06:30 EST 2007


Ben Sizer schrieb:
> Gabriel Genellina wrote:
> 

>> Notice that there is NO need to alter the system path. You just have
>> to tell Windows where python.exe resides; there is a per-application
>> path located at
>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths.
>> In order to launch Python just writing "python" at the command
>> prompt, the installer should -instead of playing with the system
>> path- create a new key below App Paths, named "python.exe", and set
>> its default value to the full path of the installed python executable.
>> See
>> http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_perceived_types.asp
> 
>>From what I can tell, that is solely for file associations. If so, it
> will work if you type "setup.py install" but not if you type "python
> setup.py install". For instance, I have an entry for Firefox in that
> part of the registry, but if you try executing "firefox" at the command
> line, it fails.

Not really.  It's for ShellExecute, which is used for the 'run' entry in the
start menu, or when you type 'start firefox' from the command line.

Thomas




More information about the Python-list mailing list