Why does Python never add itself to the Windows path?

Ben Sizer kylotan at gmail.com
Tue Jan 2 11:58:58 EST 2007


Gabriel Genellina wrote:

> At Saturday 30/12/2006 21:55, Ben Sizer wrote:
>
> >python setup.py install
> >
> >On Unix, you'd run this command from a shell prompt; on Windows, you
> >have to open a command prompt window (``DOS box'') and do it there; "
> >
> >Pretty much none of the instructions in that part of the docs will work
> >without you altering your path beforehand. Python's cross-platform
> >nature means people rightly expect the same instructions to work on
> >Linux and Windows from a standard installation. Right now, they don't.
>
> 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.

It also doesn't solve the issue of utility scripts being added to
Python's scripts directory.

-- 
Ben Sizer




More information about the Python-list mailing list