Home | History | Annotate | Download | only in python2.7

Lines Matching defs:platform

3 """ This module tries to retrieve as much platform-identifying data as
6 If called from the command line, it prints the platform
23 # Many thanks to all those who helped adding platform-specific
74 # 0.4.0 - added win32_ver() and modified the platform() output for WinXX
77 # 0.3.2 - added architecture() API and support for it in platform()
82 # 0.2.1 - added cache logic and changed the platform string format
89 # http://www.egenix.com/files/python/platform.py
120 # Determine the platform's /dev/null device
126 if sys.platform in ('dos','win32','win16','os2'):
133 ### Platform specific APIs
440 if sys.platform == 'win32': # XXX Others too ?
496 if sys.platform not in supported_platforms:
906 # is really a version and not a different platform, since 32-bit
924 """ Helper to format the platform string in a filename
927 # Format the platform string
928 platform = string.join(
935 platform = replace(platform,' ','_')
936 platform = replace(platform,'/','-')
937 platform = replace(platform,'\\','-')
938 platform = replace(platform,':','-')
939 platform = replace(platform,';','-')
940 platform = replace(platform,'"','-')
941 platform = replace(platform,'(','-')
942 platform = replace(platform,')','-')
945 platform = replace(platform,'unknown','')
949 cleaned = replace(platform,'--','-')
950 if cleaned == platform:
952 platform = cleaned
953 while platform[-1] == '-':
954 platform = platform[:-1]
956 return platform
1004 if sys.platform in ('dos','win32','win16','os2'):
1039 # from platform import machine as platform_machine
1040 # File "[..]/build/Lib/platform.py", line 116, in <module>
1048 if sys.platform in ('dos','win32','win16','os2'):
1119 if sys.platform in _default_architecture:
1120 b, l = _default_architecture[sys.platform]
1170 identifying the underlying platform.
1196 system = sys.platform
1423 elif sys.platform[:4] == 'java':
1432 compiler = sys.platform
1551 ### The Opus Magnum of platform strings :-)
1555 def platform(aliased=0, terse=0):
1557 """ Returns a single string identifying the underlying platform
1571 absolute minimum information needed to identify the platform.
1578 # Get uname information and then apply platform specific cosmetics
1590 platform = _platform(system,release)
1592 platform = _platform(system,release,version,csd)
1598 platform = _platform(system,release,machine,processor,
1604 platform = _platform(system,release,machine,processor,
1611 platform = _platform(system,release,version)
1613 platform = _platform(system,release,version,
1620 platform = _platform(system,release)
1622 platform = _platform(system,release,machine)
1627 platform = _platform(system,release)
1630 platform = _platform(system,release,machine,processor,bits,linkage)
1632 _platform_cache[(aliased, terse)] = platform
1633 return platform
1638 # Default is to print the aliased verbose platform string
1641 print platform(aliased,terse)