summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2008-03-20 17:55:31 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2008-03-20 17:55:31 (GMT)
commit53c7a60379b2eab69ab9f5ab0f5fe8acab31dfe7 (patch)
tree58c5b840b4a610668ae7b9f95160f2f9e5871e0f
parentdbd61a2bffeac56c808afa8df101932c1a175c98 (diff)
downloadcpython-53c7a60379b2eab69ab9f5ab0f5fe8acab31dfe7.zip
cpython-53c7a60379b2eab69ab9f5ab0f5fe8acab31dfe7.tar.gz
cpython-53c7a60379b2eab69ab9f5ab0f5fe8acab31dfe7.tar.bz2
Add documentation for updated Windows support in win32_ver().
Add documentation for linux_distribution() API.
-rw-r--r--Doc/library/platform.rst27
1 files changed, 23 insertions, 4 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index 2ef2f0a..47f0e7e 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -195,8 +195,9 @@ Windows Platform
.. note::
- This function only works if Mark Hammond's :mod:`win32all` package is installed
- and (obviously) only runs on Win32 compatible platforms.
+ Note: this function works best with Mark Hammond's
+ :mod:`win32all` package installed, but also on Python 2.3 and
+ later. It obviously only runs on Win32 compatible platforms.
Win95/98 specific
@@ -230,13 +231,31 @@ Unix Platforms
--------------
-.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake'))
+.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...))
Tries to determine the name of the OS distribution name Returns a tuple
``(distname, version, id)`` which defaults to the args given as parameters.
-.. XXX Document linux_distribution()?
+ ``supported_dists`` may be given to define the set of Linux
+ distributions to look for. It defaults to a list of currently
+ supported Linux distributions identified by their release file
+ name.
+.. function:: linux_distribution(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...), full_distribution_name=1)
+
+ Tries to determine the name of the Linux OS distribution name.
+
+ ``supported_dists`` may be given to define the set of Linux
+ distributions to look for. It defaults to a list of currently
+ supported Linux distributions identified by their release file
+ name.
+
+ If ``full_distribution_name`` is true (default), the full
+ distribution read from the OS is returned. Otherwise the short name
+ taken from ``supported_dists`` is used.
+
+ Returns a tuple ``(distname,version,id)`` which defaults to the
+ args given as parameters.
.. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=2048)