mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
'get_platform()' now just returns 'sys.platform' on all platforms.
This commit is contained in:
parent
22c6934885
commit
b75c485f0b
1 changed files with 4 additions and 12 deletions
|
@ -44,18 +44,10 @@ def extend (list, new_list):
|
|||
|
||||
def get_platform ():
|
||||
"""Return a string (suitable for tacking onto directory names) that
|
||||
identifies the current platform. Under Unix, identifies both the OS
|
||||
and hardware architecture, e.g. "linux-i586", "solaris-sparc",
|
||||
"irix-mips". For Windows and Mac OS, just returns 'sys.platform' --
|
||||
i.e. "???" or "???"."""
|
||||
|
||||
if os.name == 'posix':
|
||||
(OS, _, rel, _, arch) = os.uname()
|
||||
return "%s%c-%s" % (string.lower (OS), rel[0], string.lower (arch))
|
||||
else:
|
||||
return sys.platform
|
||||
|
||||
# get_platform()
|
||||
identifies the current platform. Currently, this is just
|
||||
'sys.platform'.
|
||||
"""
|
||||
return sys.platform
|
||||
|
||||
|
||||
def convert_path (pathname):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue