[Python-checkins] python/dist/src/Lib platform.py,NONE,1.1
lemburg@users.sourceforge.net
lemburg@users.sourceforge.net
Thu, 24 Apr 2003 04:36:13 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv28625/Lib
Added Files:
platform.py
Log Message:
New module platform.py, submitted by Marc-Andre Lemburg.
There's no separate documentation for this module yet - apart from the
doc-strings which explain the APIs.
--- NEW FILE: platform.py ---
#!/usr/bin/env python
""" This module tries to retrieve as much platform identifying data as
possible. It makes this information available via function APIs.
If called from the command line, it prints the platform
information concatenated as single string to stdout. The output
format is useable as part of a filename.
"""
# This module is maintained by Marc-Andre Lemburg <mal@egenix.com>.
# If you find problems, please submit bug reports/patches via the
# Python SourceForge Project Page and assign them to "lemburg".
#
# Note: Please keep this module compatible to Python 1.5.2.
#
# Still needed:
# * more support for WinCE
# * support for MS-DOS (PythonDX ?)
[...1193 lines suppressed...]
else:
bits,linkage = architecture(sys.executable)
platform = _platform(system,release,machine,processor,bits,linkage)
if aliased:
_platform_aliased_cache = platform
elif terse:
pass
else:
_platform_cache = platform
return platform
### Command line interface
if __name__ == '__main__':
# Default is to print the aliased verbose platform string
terse = ('terse' in sys.argv or '--terse' in sys.argv)
aliased = (not 'nonaliased' in sys.argv and not '--nonaliased' in sys.argv)
print platform(aliased,terse)
sys.exit(0)