rest25/library/platform.rst => rest262/library/platform.rst
82
83   Returns a tuple ``(buildno, builddate)`` stating the Python build number and
84   date as strings.
85
86
87.. function:: python_compiler()
88
89   Returns a string identifying the compiler used for compiling Python.
n90+ 
91+ 
92+.. function:: python_branch()
93+ 
94+   Returns a string identifying the Python implementation SCM branch.
95+ 
96+   .. versionadded:: 2.6
97+ 
98+ 
99+.. function:: python_implementation()
100+ 
101+   Returns a string identifying the Python implementation. Possible return values
102+   are: 'CPython', 'IronPython', 'Jython'
103+ 
104+   .. versionadded:: 2.6
105+ 
106+ 
107+.. function:: python_revision()
108+ 
109+   Returns a string identifying the Python implementation SCM revision.
110+ 
111+   .. versionadded:: 2.6
90
91
92.. function:: python_version()
93
94   Returns the Python version as string ``'major.minor.patchlevel'``
95
96   Note that unlike the Python ``sys.version``, the returned value will always
97   include the patchlevel (it defaults to 0).
168   As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT machines
169   and ``'Multiprocessor Free'`` on multi processor machines. The *'Free'* refers
170   to the OS version being free of debugging code. It could also state *'Checked'*
171   which means the OS version uses debugging code, i.e. code that checks arguments,
172   ranges, etc.
173
174   .. note::
175
n176-      This function only works if Mark Hammond's :mod:`win32all` package is installed
n198+      Note: this function works best with Mark Hammond's
199+      :mod:`win32all` package installed, but also on Python 2.3 and
200+      later (support for this was added in Python 2.6). It obviously
177-      and (obviously) only runs on Win32 compatible platforms.
201+      only runs on Win32 compatible platforms.
178
179
180Win95/98 specific
181^^^^^^^^^^^^^^^^^
n182- 
183
184.. function:: popen(cmd, mode='r', bufsize=None)
185
186   Portable :func:`popen` interface.  Find a working popen implementation
187   preferring :func:`win32pipe.popen`.  On Windows NT, :func:`win32pipe.popen`
188   should work; on Windows 9x it hangs due to bugs in the MS C library.
189
n190-   .. % This KnowledgeBase article appears to be missing...
191-   .. % See also \ulink{MS KnowledgeBase article Q150956}{}.
192- 
193
194Mac OS Platform
195---------------
196
197
198.. function:: mac_ver(release='', versioninfo=('','',''), machine='')
199
200   Get Mac OS version information and return it as tuple ``(release, versioninfo,
201   machine)`` with *versioninfo* being a tuple ``(version, dev_stage,
202   non_release_version)``.
203
204   Entries which cannot be determined are set to ``''``.  All tuple entries are
205   strings.
206
207   Documentation for the underlying :cfunc:`gestalt` API is available online at
n208-   `<http://www.rgaros.nl/gestalt/>`_.
n228+   http://www.rgaros.nl/gestalt/.
209
210
211Unix Platforms
212--------------
213
214
n215-.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake'))
n235+.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...))
216
n237+   This is another name for :func:`linux_distribution`.
238+ 
239+.. function:: linux_distribution(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...), full_distribution_name=1)
240+ 
217-   Tries to determine the name of the OS distribution name Returns a tuple
241+   Tries to determine the name of the Linux OS distribution name.
242+ 
243+   ``supported_dists`` may be given to define the set of Linux distributions to
244+   look for. It defaults to a list of currently supported Linux distributions
245+   identified by their release file name.
246+ 
247+   If ``full_distribution_name`` is true (default), the full distribution read
248+   from the OS is returned. Otherwise the short name taken from
249+   ``supported_dists`` is used.
250+ 
218-   ``(distname, version, id)`` which defaults to the args given as parameters.
251+   Returns a tuple ``(distname,version,id)`` which defaults to the args given as
219- 
252+   parameters.  ``id`` is the item in parentheses after the version number.  It
253+   is usually the version codename.
220
221.. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=2048)
222
223   Tries to determine the libc version against which the file executable (defaults
224   to the Python interpreter) is linked.  Returns a tuple of strings ``(lib,
225   version)`` which default to the given parameters in case the lookup fails.
226
227   Note that this function has intimate knowledge of how different libc versions
t228-   add symbols to the executable is probably only useable for executables compiled
t262+   add symbols to the executable is probably only usable for executables compiled
229   using :program:`gcc`.
230
231   The file is read and scanned in chunks of *chunksize* bytes.
232
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op