[Python-Dev] Utility scripts (Was: '-m' option)
Tim Peters
tim.peters at gmail.com
Mon Oct 4 20:49:43 CEST 2004
[Paul Moore]
> ...
> Accepting that Unix is generally not an issue, let's look at Windows.
> On cmd.exe, at least on Windows 2000 and up, the following makes .py
> files "executable" by python:
>
> assoc .py=Python.File
> ftype Python.File=C:\Python23\python.exe "%1" %*
> set PATHEXT=%PATHEXT%;.py
>
> Can anyone test this on COMMAND.COM on Win9x?
PATHEXT has no special meaning on 9x; you can set PATHEXT on 9x, but
it has no effect.
...
> - Change the Windows Python binary to add .py (and .pyw, maybe) to
> PATHEXT
I don't like that. The Python Windows installer doesn't add, or
modify, any environment variables now. It's anti-social to muck with
them. Anyone using "a DOS box" should know how to do that themself --
if that's what they want. I'll note that I spend much of my life in a
WinXP DOS box running Python programs, but I haven't set PATHEXT.
Since cmd.exe's path completion fills in the trailing .py on a .py
file all by itself, setting PATHEXT wouldn't save me any typing.
More information about the Python-Dev
mailing list