diff options
author | Paul Moore <p.f.moore@gmail.com> | 2016-05-22 11:28:41 (GMT) |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2016-05-22 11:28:41 (GMT) |
commit | 835416cf7caff0d397c10b98eb146372d6d6dfd0 (patch) | |
tree | ad53ba367ac636746f20e78e24878ed99e55d042 /Doc/using | |
parent | 7f3d16f8f582de1c6d19b40f7d1b8966af06cce0 (diff) | |
download | cpython-835416cf7caff0d397c10b98eb146372d6d6dfd0.zip cpython-835416cf7caff0d397c10b98eb146372d6d6dfd0.tar.gz cpython-835416cf7caff0d397c10b98eb146372d6d6dfd0.tar.bz2 |
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.
Diffstat (limited to 'Doc/using')
-rw-r--r-- | Doc/using/windows.rst | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 7520d60..2399278 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^ |