PyDocs

Nav

Generic Operating System Services

platform

platform

function (source)
  • platform(aliased=False, terse=False)
Returns a single string identifying the underlying platform
with as much useful information as possible (but no more :).

The output is intended to be human readable rather than
machine parseable. It may look different on different
platforms and this is intended.

If "aliased" is true, the function will use aliases for
various platforms that report system names which differ from
their common names, e.g. SunOS will be reported as
Solaris. The system_alias() function is used to implement
this.

Setting terse to true causes the function to return only the
absolute minimum information needed to identify the platform.
Changed in 3.8
  • 3.8: On macOS, the function now uses mac_ver(), if it returns a non-empty release string, to get the macOS version rather than the darwin version.
0 Examples
No examples for platform/platform.
See Also
No see-alsos for platform/platform
0 Notes
No notes for platform