Issue #27064: The py.exe launcher now defaults to Python 3.

The Windows launcher ``py.exe`` no longer prefers an installed
Python 2 version over Python 3 by default when used interactively.
This commit is contained in:
Paul Moore 2016-05-22 12:28:41 +01:00
parent 7f3d16f8f5
commit 835416cf7c
4 changed files with 45 additions and 14 deletions

View file

@ -418,6 +418,8 @@ Getting started
From the command-line
^^^^^^^^^^^^^^^^^^^^^
.. versionchanged:: 3.6
System-wide installations of Python 3.3 and later will put the launcher on your
:envvar:`PATH`. The launcher is compatible with all available versions of
Python, so it does not matter which version is installed. To check that the
@ -427,25 +429,26 @@ launcher is available, execute the following command in Command Prompt:
py
You should find that the latest version of Python 2.x you have installed is
You should find that the latest version of Python you have installed is
started - it can be exited as normal, and any additional command-line
arguments specified will be sent directly to Python.
If you have multiple versions of Python 2.x installed (e.g., 2.6 and 2.7) you
will have noticed that Python 2.7 was started - to launch Python 2.6, try the
If you have multiple versions of Python installed (e.g., 2.7 and 3.6) you
will have noticed that Python 3.6 was started - to launch Python 2.7, try the
command:
::
py -2.6
py -2.7
If you have a Python 3.x installed, try the command:
If you want the latest version of Python 2.x you have installed, try the
command:
::
py -3
py -2
You should find the latest version of Python 3.x starts.
You should find the latest version of Python 2.x starts.
If you see the following error, you do not have the launcher installed:
@ -500,6 +503,11 @@ version qualifier. Assuming you have Python 2.6 installed, try changing the
first line to ``#! python2.6`` and you should find the 2.6 version
information printed.
Note that unlike interactive use, a bare "python" will use the latest
version of Python 2.x that you have installed. This is for backward
compatibility and for compatibility with Unix, where the command ``python``
typically refers to Python 2.
From file associations
^^^^^^^^^^^^^^^^^^^^^^