On this page
platform.uname
Prev: platform.system_alias | Up: platform | Next: platform.uname_result
Rel: platform.android_ver, platform.AndroidVer, platform.architecture, platform.freedesktop_os_release
Ref: docs.python.org — platform.uname
Tags: #public #python3 #stdlib #platform
Import
import platform
from platform import uname
Signature & Overview
platform.uname()
Fairly portable uname interface. Returns a tuple of strings (system, node, release, version, machine, processor) identifying the underlying platform.
Usage
import platform
u = platform.uname()
assert u.system == platform.system() and u.machine == platform.machine()
Gotchas
- Cross-platform counterpart to
os.uname()(works on Windows too).
REPL Inspect
from platform import uname
help(uname)
Linked from
Related notes
- tuts/python3/stdlib_module/platform/system_alias Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/uname_result Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/android_ver Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/AndroidVer Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/architecture Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/freedesktop_os_release Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/platform Linked here; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/platform/invalidate_caches shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/ios_ver shared tags: #platform, #stdlib