Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Side by Side Diff: Doc/library/sys.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/subprocess.rst ('k') | Doc/library/tempfile.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`sys` --- System-specific parameters and functions 1 :mod:`sys` --- System-specific parameters and functions
2 ======================================================= 2 =======================================================
3 3
4 .. module:: sys 4 .. module:: sys
5 :synopsis: Access system-specific parameters and functions. 5 :synopsis: Access system-specific parameters and functions.
6 6
7 7
8 This module provides access to some variables used or maintained by the 8 This module provides access to some variables used or maintained by the
9 interpreter and to functions that interact strongly with the interpreter. It is 9 interpreter and to functions that interact strongly with the interpreter. It is
10 always available. 10 always available.
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 698
699 699
700 .. data:: platform 700 .. data:: platform
701 701
702 This string contains a platform identifier that can be used to append 702 This string contains a platform identifier that can be used to append
703 platform-specific components to :data:`sys.path`, for instance. 703 platform-specific components to :data:`sys.path`, for instance.
704 704
705 For Unix systems, this is the lowercased OS name as returned by ``uname -s`` 705 For Unix systems, this is the lowercased OS name as returned by ``uname -s``
706 with the first part of the version as returned by ``uname -r`` appended, 706 with the first part of the version as returned by ``uname -r`` appended,
707 e.g. ``'sunos5'`` or ``'linux2'``, *at the time when Python was built*. 707 e.g. ``'sunos5'`` or ``'linux2'``, *at the time when Python was built*.
708 Unless you want to test for a specific system version, it is therefore
709 recommended to use the following idiom::
710
711 if sys.platform.startswith('linux'):
712 # Linux-specific code here...
713
714 For other systems, the values are: 708 For other systems, the values are:
715 709
716 ================ =========================== 710 ================ ===========================
717 System :data:`platform` value 711 System :data:`platform` value
718 ================ =========================== 712 ================ ===========================
719 Windows ``'win32'`` 713 Windows ``'win32'``
720 Windows/Cygwin ``'cygwin'`` 714 Windows/Cygwin ``'cygwin'``
721 Mac OS X ``'darwin'`` 715 Mac OS X ``'darwin'``
722 OS/2 ``'os2'`` 716 OS/2 ``'os2'``
723 OS/2 EMX ``'os2emx'`` 717 OS/2 EMX ``'os2emx'``
724 ================ =========================== 718 ================ ===========================
725 719
726 .. seealso::
727 :attr:`os.name` has a coarser granularity. :func:`os.uname` gives
728 system-dependent version information.
729
730 The :mod:`platform` module provides detailed checks for the
731 system's identity.
732 720
733 .. data:: prefix 721 .. data:: prefix
734 722
735 A string giving the site-specific directory prefix where the platform 723 A string giving the site-specific directory prefix where the platform
736 independent Python files are installed; by default, this is the string 724 independent Python files are installed; by default, this is the string
737 ``'/usr/local'``. This can be set at build time with the ``--prefix`` 725 ``'/usr/local'``. This can be set at build time with the ``--prefix``
738 argument to the :program:`configure` script. The main collection of Python 726 argument to the :program:`configure` script. The main collection of Python
739 library modules is installed in the directory ``prefix + '/lib/pythonversion' `` 727 library modules is installed in the directory ``prefix + '/lib/pythonversion' ``
740 while the platform independent header files (all except :file:`pyconfig.h`) a re 728 while the platform independent header files (all except :file:`pyconfig.h`) a re
741 stored in ``prefix + '/include/pythonversion'``, where *version* is equal to 729 stored in ``prefix + '/include/pythonversion'``, where *version* is equal to
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 :option:`-X`. Other implementations may export them through other 1062 :option:`-X`. Other implementations may export them through other
1075 means, or not at all. 1063 means, or not at all.
1076 1064
1077 .. versionadded:: 3.2 1065 .. versionadded:: 3.2
1078 1066
1079 1067
1080 .. rubric:: Citations 1068 .. rubric:: Citations
1081 1069
1082 .. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of th is standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n125 6.pdf . 1070 .. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of th is standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n125 6.pdf .
1083 1071
OLDNEW
« no previous file with comments | « Doc/library/subprocess.rst ('k') | Doc/library/tempfile.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+