diff options
author | Christian Heimes <christian@cheimes.de> | 2008-03-21 01:11:52 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-03-21 01:11:52 (GMT) |
commit | 02781dc7541b79e499c06ead64535c317efc460e (patch) | |
tree | 71c1b357dcf08877c717b65048f75cb4e1d08cd2 /Doc/library/platform.rst | |
parent | 3fd139951c677929c3131765a78ba6c18248b74e (diff) | |
download | cpython-02781dc7541b79e499c06ead64535c317efc460e.zip cpython-02781dc7541b79e499c06ead64535c317efc460e.tar.gz cpython-02781dc7541b79e499c06ead64535c317efc460e.tar.bz2 |
Merged revisions 61672,61674,61676-61678,61681,61683-61684 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61672 | brett.cannon | 2008-03-20 17:13:48 +0100 (Do, 20 Mär 2008) | 2 lines
Gave Jerry Seutter svn access for general Python development.
........
r61674 | marc-andre.lemburg | 2008-03-20 18:31:36 +0100 (Do, 20 Mär 2008) | 7 lines
If Mark Hammonds win32 tools are not available, try to use the _winreg module
and sys.getwindowsversion() to get at the Windows version info.
For the machine and processor uname() values, use the environment variables
for these on Windows XP and later.
........
r61676 | marc-andre.lemburg | 2008-03-20 18:55:31 +0100 (Do, 20 Mär 2008) | 5 lines
Add documentation for updated Windows support in win32_ver().
Add documentation for linux_distribution() API.
........
r61677 | marc-andre.lemburg | 2008-03-20 19:08:00 +0100 (Do, 20 Mär 2008) | 2 lines
Add news items for platform module changes.
........
r61678 | marc-andre.lemburg | 2008-03-20 19:58:14 +0100 (Do, 20 Mär 2008) | 3 lines
Clarfiy the availability of the extended support for win32_ver() in Py2.6.
........
r61681 | andrew.kuchling | 2008-03-20 23:49:26 +0100 (Do, 20 Mär 2008) | 1 line
Add lots of items
........
r61683 | eric.smith | 2008-03-21 00:04:04 +0100 (Fr, 21 Mär 2008) | 1 line
Fixed PEP name.
........
r61684 | eric.smith | 2008-03-21 00:56:08 +0100 (Fr, 21 Mär 2008) | 1 line
Comment how 'from __future__ import print_function' operates in 3.0.
........
Diffstat (limited to 'Doc/library/platform.rst')
-rw-r--r-- | Doc/library/platform.rst | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index bb1e672..22ac72d 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -187,8 +187,10 @@ 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 (support for this was added in Python 2.6). It obviously + only runs on Win32 compatible platforms. Win95/98 specific @@ -222,13 +224,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) |