summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-20 12:57:47 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-20 12:57:47 (GMT)
commit440f2fff14f549f1deb8c9d1a9f52444acb1aad1 (patch)
treeb562171c685f1f52e6750a3e9101c8d9608c82e0 /Doc/library
parentd5e6cf2b152061cdae0164cef2382086c7638bbc (diff)
downloadcpython-440f2fff14f549f1deb8c9d1a9f52444acb1aad1.zip
cpython-440f2fff14f549f1deb8c9d1a9f52444acb1aad1.tar.gz
cpython-440f2fff14f549f1deb8c9d1a9f52444acb1aad1.tar.bz2
#799369: document possible sys.platform values.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/sys.rst23
1 files changed, 20 insertions, 3 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 6b88d61..c6fe2fa 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -507,9 +507,26 @@ always available.
.. data:: platform
- This string contains a platform identifier, e.g. ``'sunos5'`` or ``'linux1'``.
- This can be used to append platform-specific components to ``path``, for
- instance.
+ This string contains a platform identifier that can be used to append
+ platform-specific components to :data:`sys.path`, for instance.
+
+ For Unix systems, this is the lowercased OS name as returned by ``uname -s``
+ with the first part of the version as returned by ``uname -r`` appended,
+ e.g. ``'sunos5'`` or ``'linux2'``, *at the time when Python was built*.
+ For other systems, the values are:
+
+ ================ ===========================
+ System :data:`platform` value
+ ================ ===========================
+ Windows ``'win32'``
+ Windows/Cygwin ``'cygwin'``
+ MacOS X ``'darwin'``
+ MacOS 9 ``'mac'``
+ OS/2 ``'os2'``
+ OS/2 EMX ``'os2emx'``
+ RiscOS ``'riscos'``
+ AtheOS ``'atheos'``
+ ================ ===========================
.. data:: prefix