[Python-ideas] Rename python.exe to python3.exe on Windows

Devin Jeanpierre jeanpierreda at gmail.com
Sun May 8 02:57:29 CEST 2011


Hello,

On most *nix systems, Python 3.x is available as the python3
executable, and Python 2.x as the 'python' executable. This lets both
exist side-by-side and be usable from the command-line. The
alternative (used by Arch), is to name Python 2.x 'python2', and 3.x
'python'. The Windows distribution of Python does neither, it names
them both 'python.exe', meaning that you can't install and use both at
once. Moreover, if you install Python 2.7 and then Python 3.2, the
default handler for .py files is set to Python 3.2, and changing it to
2.7 is difficult because of a quirk in Eexplorer that forces you to
choose between two non-distinguishable "python.exe"s. This is made
much more difficult if in fact you installed five or so different
Python versions. Also any automated tests using something like Cram
that use python3 will not work, and any batch scripts that use
python.exe will work differently depending on the host system.

(It wouldn't be awful to get python-X.Y.exe executables, either).

The downside of this is that any code that tries to use
C:\Python3Y\python.exe breaks. Such code is probably broken anyway,
there are multiple Ys around, and Python can be installed in My
Documents or wherever. PEP 397 should relieve the issues with opening
.py files, making some of this unnecessary with that change, as well.

I'm guessing that it would also be appropriate to rename pythonw.exe
to python3w.exe. I doubt that particular change matters at all, it's
solely to do with opening .pyw files, and that should be handled by
PEP 397.

I'd appreciate any thoughts or comments you might have.

Thanks for your time,
Devin Jeanpierre



More information about the Python-ideas mailing list