MCPcopy Index your code
hub / github.com/python/cpython / mac_ver

Function mac_ver

Lib/platform.py:496–513  ·  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

494
495
496def mac_ver(release='', versioninfo=('', '', ''), machine=''):
497
498 """ Get macOS version information and return it as tuple (release,
499 versioninfo, machine) with versioninfo being a tuple (version,
500 dev_stage, non_release_version).
501
502 Entries which cannot be determined are set to the parameter values
503 which default to ''. All tuple entries are strings.
504 """
505
506 # First try reading the information from an XML file which should
507 # always be present
508 info = _mac_ver_xml()
509 if info is not None:
510 return info
511
512 # If that also doesn't work return the default values
513 return release, versioninfo, machine
514
515
516# A namedtuple for iOS version information.

Callers 1

platformFunction · 0.85

Calls 1

_mac_ver_xmlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…