]> granicus.if.org Git - python/commitdiff
#799369: document possible sys.platform values.
authorGeorg Brandl <georg@python.org>
Sun, 20 Jan 2008 12:57:47 +0000 (12:57 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 20 Jan 2008 12:57:47 +0000 (12:57 +0000)
Doc/library/sys.rst

index 6b88d613e2bed0c1ff4bcda2ee41298e8db7b628..c6fe2fae60a4ddc72b177a9a0c66a529e693725c 100644 (file)
@@ -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