[Python-checkins] python/dist/src/Lib platform.py,1.5,1.5.8.1

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Tue Oct 14 18:32:36 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv14867/Lib
Modified Files:
 Tag: release23-maint
	platform.py 
Log Message:
Backport of rev. 1.6 and 1.7 from head.
1.6 was docstring clean-up.
1.7 was a fix for bug #780461 (platform.mac_ver() failing under OS X) and
was flagged as a backport candidate.
Index: platform.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/platform.py,v
retrieving revision 1.5
retrieving revision 1.5.8.1
diff -C2 -d -r1.5 -r1.5.8.1
*** platform.py	29 Jun 2003 04:17:45 -0000	1.5
--- platform.py	14 Oct 2003 22:32:34 -0000	1.5.8.1
***************
*** 1,5 ****
 #!/usr/bin/env python
 
! """ This module tries to retrieve as much platform identifying data as
 possible. It makes this information available via function APIs.
 
--- 1,5 ----
 #!/usr/bin/env python
 
! """ This module tries to retrieve as much platform-identifying data as
 possible. It makes this information available via function APIs.
 
***************
*** 21,25 ****
 # * support for additional Linux distributions
 #
! # Many thanks to all those who helped adding platform specific
 # checks (in no particular order):
 #
--- 21,25 ----
 # * support for additional Linux distributions
 #
! # Many thanks to all those who helped adding platform-specific
 # checks (in no particular order):
 #
***************
*** 119,124 ****
 chunksize=2048):
 
! """ Tries to determine the libc version against which the
! file executable (defaults to the Python interpreter) is linked.
 
 Returns a tuple of strings (lib,version) which default to the
--- 119,124 ----
 chunksize=2048):
 
! """ Tries to determine the libc version that the file executable
! (which defaults to the Python interpreter) is linked against.
 
 Returns a tuple of strings (lib,version) which default to the
***************
*** 126,131 ****
 
 Note that the function has intimate knowledge of how different
! libc versions add symbols to the executable is probably only
! useable for executables compiled using gcc.
 
 The file is read and scanned in chunks of chunksize bytes.
--- 126,131 ----
 
 Note that the function has intimate knowledge of how different
! libc versions add symbols to the executable and thus is probably
! only useable for executables compiled using gcc.
 
 The file is read and scanned in chunks of chunksize bytes.
***************
*** 220,224 ****
 supported_dists=('SuSE','debian','redhat','mandrake')):
 
! """ Tries to determine the name of the OS distribution name
 
 The function first looks for a distribution release file in
--- 220,224 ----
 supported_dists=('SuSE','debian','redhat','mandrake')):
 
! """ Tries to determine the name of the Linux OS distribution name.
 
 The function first looks for a distribution release file in
***************
*** 226,230 ****
 suitable files are found.
 
! Returns a tuple distname,version,id which default to the
 args given as parameters.
 
--- 226,230 ----
 suitable files are found.
 
! Returns a tuple (distname,version,id) which default to the
 args given as parameters.
 
***************
*** 352,356 ****
 def _norm_version(version,build=''):
 
! """ Normalize the version and build strings and return a sinlge
 vesion string using the format major.minor.build (or patchlevel).
 """
--- 352,356 ----
 def _norm_version(version,build=''):
 
! """ Normalize the version and build strings and return a single
 vesion string using the format major.minor.build (or patchlevel).
 """
***************
*** 526,529 ****
--- 526,530 ----
 
 from gestalt import gestalt
+ import MacOS
 l = []
 append = l.append
***************
*** 531,535 ****
 try:
 append(gestalt(selector))
! except RuntimeError:
 append(default)
 return l
--- 532,536 ----
 try:
 append(gestalt(selector))
! except (RuntimeError, MacOS.Error):
 append(default)
 return l
***************
*** 545,550 ****
 dev_stage, non_release_version).
 
! Entries which cannot be determined are set to ''. All tuple
! entries are strings.
 
 Thanks to Mark R. Levinson for mailing documentation links and
--- 546,551 ----
 dev_stage, non_release_version).
 
! Entries which cannot be determined are set to the paramter values
! which default to ''. All tuple entries are strings.
 
 Thanks to Mark R. Levinson for mailing documentation links and
***************
*** 558,561 ****
--- 559,563 ----
 try:
 import gestalt
+ import MacOS
 except ImportError:
 return release,versioninfo,machine
***************
*** 596,600 ****
 def java_ver(release='',vendor='',vminfo=('','',''),osinfo=('','','')):
 
! """ Version interface for JPython.
 
 Returns a tuple (release,vendor,vminfo,osinfo) with vminfo being
--- 598,602 ----
 def java_ver(release='',vendor='',vminfo=('','',''),osinfo=('','','')):
 
! """ Version interface for Jython.
 
 Returns a tuple (release,vendor,vminfo,osinfo) with vminfo being
***************
*** 816,822 ****
 
 """ Queries the given executable (defaults to the Python interpreter
! binary) for various architecture informations.
 
! Returns a tuple (bits,linkage) which contain information about
 the bit architecture and the linkage format used for the
 executable. Both values are returned as strings.
--- 818,824 ----
 
 """ Queries the given executable (defaults to the Python interpreter
! binary) for various architecture information.
 
! Returns a tuple (bits,linkage) which contains information about
 the bit architecture and the linkage format used for the
 executable. Both values are returned as strings.
***************
*** 829,835 ****
 The function relies on the system's "file" command to do the
 actual work. This is available on most if not all Unix
! platforms. On some non-Unix platforms and then only if the
! executable points to the Python interpreter defaults from
! _default_architecture are used.
 
 """
--- 831,837 ----
 The function relies on the system's "file" command to do the
 actual work. This is available on most if not all Unix
! platforms. On some non-Unix platforms where the "file" command
! does not exist and the executable is set to the Python interpreter
! binary defaults from _default_architecture are used.
 
 """
***************
*** 906,910 ****
 
 Note that unlike the os.uname function this also returns
! possible processor information as additional tuple entry.
 
 Entries which cannot be determined are set to ''.
--- 908,912 ----
 
 Note that unlike the os.uname function this also returns
! possible processor information as an additional tuple entry.
 
 Entries which cannot be determined are set to ''.
***************
*** 1014,1018 ****
 def node():
 
! """ Returns the computer's network name (may not be fully qualified !)
 
 An empty string is returned if the value cannot be determined.
--- 1016,1021 ----
 def node():
 
! """ Returns the computer's network name (which may not be fully
! qualified)
 
 An empty string is returned if the value cannot be determined.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /