Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02781dc

Browse files
committed
Merged revisions 61672,61674,61676-61678,61681,61683-61684 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 3fd1399 commit 02781dc

5 files changed

Lines changed: 282 additions & 61 deletions

File tree

Doc/library/platform.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ Windows Platform
187187

188188
.. note::
189189

190-
This function only works if Mark Hammond's :mod:`win32all` package is installed
191-
and (obviously) only runs on Win32 compatible platforms.
190+
Note: this function works best with Mark Hammond's
191+
:mod:`win32all` package installed, but also on Python 2.3 and
192+
later (support for this was added in Python 2.6). It obviously
193+
only runs on Win32 compatible platforms.
192194

193195

194196
Win95/98 specific
@@ -222,13 +224,31 @@ Unix Platforms
222224
--------------
223225

224226

225-
.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake'))
227+
.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...))
226228

227229
Tries to determine the name of the OS distribution name Returns a tuple
228230
``(distname, version, id)`` which defaults to the args given as parameters.
229231

230-
.. XXX Document linux_distribution()?
232+
``supported_dists`` may be given to define the set of Linux
233+
distributions to look for. It defaults to a list of currently
234+
supported Linux distributions identified by their release file
235+
name.
231236

237+
.. function:: linux_distribution(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...), full_distribution_name=1)
238+
239+
Tries to determine the name of the Linux OS distribution name.
240+
241+
``supported_dists`` may be given to define the set of Linux
242+
distributions to look for. It defaults to a list of currently
243+
supported Linux distributions identified by their release file
244+
name.
245+
246+
If ``full_distribution_name`` is true (default), the full
247+
distribution read from the OS is returned. Otherwise the short name
248+
taken from ``supported_dists`` is used.
249+
250+
Returns a tuple ``(distname,version,id)`` which defaults to the
251+
args given as parameters.
232252

233253
.. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=2048)
234254

0 commit comments

Comments
 (0)