[Python-ideas] Make py.exe default to Python 3

Paul Moore p.f.moore at gmail.com
Sun Mar 13 07:39:19 EDT 2016

On 13 March 2016 at 04:09, Andrew Barnert via Python-ideas
<python-ideas at python.org> wrote:
> At any rate, this seems to be a separate issue from the one this thread is about. It's already true that py.exe is Windows-specific; no change to what it does is going to make the same command lines work on Windows and *nix. Only some new proposal (add a py command for Unix, add python2 and python3 links for Windows, make Python.exe itself a dispatcher as Apple's /usr/bin/python is on Mac, ...) is going to help you. So you might be better off creating a new thread instead of adding on to one that's mostly been resolved and a lot of people have stopped reading.


Just to summarise the final state of this thread, the consensus seems to be:

1. For interactive use, make py.exe launch the latest version
installed on the machine, without special-casing a preference for
Python 2.
2. For shebang lines where an unversioned name is used, retain the
current behaviour (for compatibility with Unix).
3. When the user explicitly chooses a version, or has configured the
launcher via the ini file or environment variables, no change to
current behaviour.
4. The change is small enough that it doesn't need a PEP.

On that basis, I'll make some time to brush off my C skills and raise
a tracker item, targeted at Python 3.6.

As far as I know, there's no special exemption for new features in the
launcher being backported to older versions of Python, and there's no
"standalone" launcher installer, so this change will only affect
people who install the launcher via the Python 3.6 or later installer.


More information about the Python-ideas mailing list