PyDocs

Generic Operating System Services

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 usable as part of a filename.
Symbols in platform

a

android_ver
Get Android device information.
architecture
Queries the given executable (defaults to the Python interpreter binary) for various architecture information.

f

freedesktop_os_release
Return operation system identification from freedesktop.org os-release

i

invalidate_caches
Invalidate the cached results.
ios_ver
Get iOS version information, and return it as a namedtuple: (system, release, model, is_simulator).

l

libc_ver
Tries to determine the libc version that the file executable (which defaults to the Python interpreter) is linked against.

m

mac_ver
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.

n

node
Returns the computer's network name (which may not be fully qualified)

p

platform
Returns a single string identifying the underlying platform with as much useful information as possible (but no more :).
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.

r

release
Returns the system's release, e.g.

s

system
Returns the system/OS name, e.g.
system_alias
Returns (system, release, version) aliased to common marketing names used for some systems.

u

uname
Fairly portable uname interface.

v

version
Returns the system's release version, e.g.

w

win32_edition
Returns a string representing the current Windows edition, or None if the value cannot be determined.
win32_is_iot
Return True if the Windows edition returned by win32_edition() is recognized as an IoT edition.
win32_ver
Get additional version information from the Windows Registry and return a tuple (release, version, csd, ptype) referring to OS release, version number, CSD level (service pack) and OS type (multi/sin…