Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3db38ce

Browse files
committed
#3577: 3.0 is not installed as "python" on Unix.
1 parent fcfb5f2 commit 3db38ce

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

Doc/tutorial/interpreter.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ Using the Python Interpreter
1010
Invoking the Interpreter
1111
========================
1212

13-
The Python interpreter is usually installed as :file:`/usr/local/bin/python` on
14-
those machines where it is available; putting :file:`/usr/local/bin` in your
13+
The Python interpreter is usually installed as :file:`/usr/local/bin/python3.0`
14+
on those machines where it is available; putting :file:`/usr/local/bin` in your
1515
Unix shell's search path makes it possible to start it by typing the command ::
1616

17-
python
17+
python3.0
1818

19-
to the shell. Since the choice of the directory where the interpreter lives is
20-
an installation option, other places are possible; check with your local Python
21-
guru or system administrator. (E.g., :file:`/usr/local/python` is a popular
22-
alternative location.)
19+
to the shell. [#]_ Since the choice of the directory where the interpreter lives
20+
is an installation option, other places are possible; check with your local
21+
Python guru or system administrator. (E.g., :file:`/usr/local/python` is a
22+
popular alternative location.)
2323

2424
On Windows machines, the Python installation is usually placed in
2525
:file:`C:\Python30`, though you can change this when you're running the
@@ -58,8 +58,8 @@ Some Python modules are also useful as scripts. These can be invoked using
5858
``python -m module [arg] ...``, which executes the source file for *module* as
5959
if you had spelled out its full name on the command line.
6060

61-
Note that there is a difference between ``python file`` and ``python <file``.
62-
In the latter case, input requests from the program, such as calling
61+
Note that there is a difference between ``python file`` and ``python
62+
<file``. In the latter case, input requests from the program, such as calling
6363
``sys.stdin.read()``, are satisfied from *file*. Since this file has already
6464
been read until the end by the parser before the program starts executing, the
6565
program will encounter end-of-file immediately. In the former case (which is
@@ -101,7 +101,7 @@ with the *secondary prompt*, by default three dots (``...``). The interpreter
101101
prints a welcome message stating its version number and a copyright notice
102102
before printing the first prompt::
103103

104-
$ python
104+
$ python3.0
105105
Python 3.0a1 (py3k, Sep 12 2007, 12:21:02)
106106
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
107107
Type "help", "copyright", "credits" or "license" for more information.
@@ -155,7 +155,7 @@ Executable Python Scripts
155155
On BSD'ish Unix systems, Python scripts can be made directly executable, like
156156
shell scripts, by putting the line ::
157157

158-
#! /usr/bin/env python
158+
#! /usr/bin/env python3.0
159159

160160
(assuming that the interpreter is on the user's :envvar:`PATH`) at the beginning
161161
of the script and giving the file an executable mode. The ``#!`` must be the
@@ -243,5 +243,9 @@ in the script::
243243

244244
.. rubric:: Footnotes
245245

246+
.. [#] On Unix, the 3.0 interpreter is by default not installed with the
247+
executable named ``python``, so that it does not conflict with a
248+
simultaneously installed Python 2.x executable.
249+
246250
.. [#] A problem with the GNU Readline package may prevent this.
247251

0 commit comments

Comments
 (0)