platform

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.

Functions

architecture([executable, bits, linkage]) Queries the given executable (defaults to the Python interpreter binary) for various architecture information.
dist([distname, version, id, supported_dists]) Tries to determine the name of the Linux OS distribution name.
java_ver([release, vendor, vminfo, osinfo]) Version interface for Jython.
libc_ver([executable, lib, version, chunksize]) Tries to determine the libc version that the file executable (which defaults to the Python interpreter) is linked against.
linux_distribution([distname, version, id, ...]) Tries to determine the name of the Linux OS distribution name.
mac_ver([release, versioninfo, machine]) Get MacOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version).
machine() Returns the machine type, e.g.
node() Returns the computer’s network name (which may not be fully
platform([aliased, terse]) Returns a single string identifying the underlying platform with as much useful information as possible (but no more :).
popen(cmd[, mode, bufsize]) Portable popen() interface.
processor() Returns the (true) processor name, e.g.
python_branch() Returns a string identifying the Python implementation branch.
python_build() Returns a tuple (buildno, builddate) stating the Python build number and date as strings.
python_compiler() Returns a string identifying the compiler used for compiling Python.
python_implementation() Returns a string identifying the Python implementation.
python_revision() Returns a string identifying the Python implementation revision.
python_version() Returns the Python version as string ‘major.minor.patchlevel’
python_version_tuple() Returns the Python version as tuple (major, minor, patchlevel) of strings.
release() Returns the system’s release, e.g.
system() Returns the system/OS name, e.g.
system_alias(system, release, version) Returns (system,release,version) aliased to common marketing names used for some systems.
uname() Fairly portable uname interface.
version() Returns the system’s release version, e.g.
win32_ver([release, version, csd, ptype])