On this page
platform.mac_ver
Prev: platform.libc_ver | Up: platform | Next: platform.machine
Rel: platform.android_ver, platform.AndroidVer, platform.architecture, platform.freedesktop_os_release
Ref: docs.python.org — platform.mac_ver
Tags: #public #python3 #stdlib #platform
Import
import platform
from platform import mac_ver
Signature & Overview
platform.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).
Usage
import platform
release, versioninfo, machine = platform.mac_ver()
assert isinstance(release, str)
Gotchas
- Empty strings on non-macOS systems.
REPL Inspect
from platform import mac_ver
help(mac_ver)
Linked from
Related notes
- tuts/python3/stdlib_module/platform/libc_ver Linked here; links to this page; shared tags: #platform, #stdlib
- tuts/python3/stdlib_module/platform/machine 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