MCPcopy Index your code
hub / github.com/RustPython/RustPython / mac_ver

Function mac_ver

Lib/platform.py:482–499  ·  view source on GitHub ↗

Get macOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the parameter values which default to ''. All tuple entries a

(release='', versioninfo=('', '', ''), machine='')

Source from the content-addressed store, hash-verified

480
481
482def mac_ver(release='', versioninfo=('', '', ''), machine=''):
483
484 """ Get macOS version information and return it as tuple (release,
485 versioninfo, machine) with versioninfo being a tuple (version,
486 dev_stage, non_release_version).
487
488 Entries which cannot be determined are set to the parameter values
489 which default to ''. All tuple entries are strings.
490 """
491
492 # First try reading the information from an XML file which should
493 # always be present
494 info = _mac_ver_xml()
495 if info is not None:
496 return info
497
498 # If that also doesn't work return the default values
499 return release, versioninfo, machine
500
501
502# A namedtuple for iOS version information.

Callers 1

platformFunction · 0.85

Calls 1

_mac_ver_xmlFunction · 0.85

Tested by

no test coverage detected