[python-win32] Re: Feature request for Python's msi

Thomas Heller theller at python.net
Thu Jan 20 08:59:45 CET 2005


>> 2. Append .PY to the system PATHEXT.
>
> This makes sense, but also may be confusing with multiple versions.

I don't see a problem with multiple versions, the 'default' version is
used when you type 'path\to\script'.  And you can use batch files to
select a specific Python version.

But I also don't see a problem changing the env var yourself: it has
only be done once.

>> That way, if I install some tool that happens to have been written in
>> python, I can use it on the command line as
>>
>> C:\somewhere\> foo arg arg
>>
>> , rather than as:
>>
>> C:\somewhere\> C:\Python24\Scripts\foo.py arg arg
>
> In your real cases, who provided "foo.py"?  If it was not installed with
> Python itself (ie, is a script you provided), then it may be better to add
> these scripts to a completely different directory, and ensure that directory
> is on your PATH.  I can't think of any Python supplied scripts which are so
> useful they should be on the PATH, so I suspect you would have an uphill
> battle getting that one accepted.

c:\PythonXY\Scripts is the default directory for scripts installed via
distutils.  If the ..\Scripts directory would be changed into a package,
and the '-m' Python command line switch would be implemented fully
(there's a PEP for it now), you could run the script in this way, with
the batch files helpers (py23.bat, py24.bat) I mentioned before:

py23 -m Scripts.foo arg arg

Thomas



More information about the Python-win32 mailing list