diff options
author | Éric Araujo <merwok@netwok.org> | 2011-09-09 17:11:04 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-09-09 17:11:04 (GMT) |
commit | 46a9d62828bb1179dc718fb0ac24e7db5e8fa39f (patch) | |
tree | 691687e66aae1ac8bd34d8f60b6fba22df0ff66d /Doc/using | |
parent | 9e3e70b33143be1082f01c14c1be25b0ff0be1bf (diff) | |
parent | eb933de807e5cba2d012fe6c7f8c1c64bab03660 (diff) | |
download | cpython-46a9d62828bb1179dc718fb0ac24e7db5e8fa39f.zip cpython-46a9d62828bb1179dc718fb0ac24e7db5e8fa39f.tar.gz cpython-46a9d62828bb1179dc718fb0ac24e7db5e8fa39f.tar.bz2 |
Merge 3.2
Diffstat (limited to 'Doc/using')
-rw-r--r-- | Doc/using/unix.rst | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/Doc/using/unix.rst b/Doc/using/unix.rst index d065512..8ace699 100644 --- a/Doc/using/unix.rst +++ b/Doc/using/unix.rst @@ -1,4 +1,4 @@ -.. highlightlang:: none +.. highlightlang:: sh .. _using-on-unix: @@ -55,8 +55,8 @@ On FreeBSD and OpenBSD On OpenSolaris -------------- -To install the newest Python versions on OpenSolaris, install blastwave -(http://www.blastwave.org/howto.html) and type "pkg_get -i python" at the +To install the newest Python versions on OpenSolaris, install `blastwave +<http://www.blastwave.org/howto.html>`_ and type ``pkg_get -i python`` at the prompt. @@ -65,22 +65,23 @@ Building Python If you want to compile CPython yourself, first thing you should do is get the `source <http://python.org/download/source/>`_. You can download either the -latest release's source or just grab a fresh `checkout -<http://docs.python.org/devguide/setup#checking-out-the-code>`_. +latest release's source or just grab a fresh `clone +<http://docs.python.org/devguide/setup#getting-the-source-code>`_. (If you want +to contribute patches, you will need a clone.) -The build process consists the usual :: +The build process consists in the usual :: ./configure make make install invocations. Configuration options and caveats for specific Unix platforms are -extensively documented in the :file:`README` file in the root of the Python +extensively documented in the :source:`README` file in the root of the Python source tree. .. warning:: - ``make install`` can overwrite or masquerade the :file:`python` binary. + ``make install`` can overwrite or masquerade the :file:`python3` binary. ``make altinstall`` is therefore recommended instead of ``make install`` since it only installs :file:`{exec_prefix}/bin/python{version}`. @@ -98,7 +99,7 @@ For example, on most Linux systems, the default for both is :file:`/usr`. +-----------------------------------------------+------------------------------------------+ | File/directory | Meaning | +===============================================+==========================================+ -| :file:`{exec_prefix}/bin/python` | Recommended location of the interpreter. | +| :file:`{exec_prefix}/bin/python3` | Recommended location of the interpreter. | +-----------------------------------------------+------------------------------------------+ | :file:`{prefix}/lib/python{version}`, | Recommended locations of the directories | | :file:`{exec_prefix}/lib/python{version}` | containing the standard modules. | @@ -108,10 +109,6 @@ For example, on most Linux systems, the default for both is :file:`/usr`. | | developing Python extensions and | | | embedding the interpreter. | +-----------------------------------------------+------------------------------------------+ -| :file:`~/.pythonrc.py` | User-specific initialization file loaded | -| | by the user module; not used by default | -| | or by most applications. | -+-----------------------------------------------+------------------------------------------+ Miscellaneous @@ -125,11 +122,11 @@ e.g. with :: and put an appropriate Shebang line at the top of the script. A good choice is usually :: - #!/usr/bin/env python + #!/usr/bin/env python3 which searches for the Python interpreter in the whole :envvar:`PATH`. However, some Unices may not have the :program:`env` command, so you may need to hardcode -``/usr/bin/python`` as the interpreter path. +``/usr/bin/python3`` as the interpreter path. To use shell commands in your Python scripts, look at the :mod:`subprocess` module. |