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

Function _mac_ver_xml

Lib/platform.py:474–493  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

472
473
474def _mac_ver_xml():
475 fn = '/System/Library/CoreServices/SystemVersion.plist'
476 if not os.path.exists(fn):
477 return None
478
479 try:
480 import plistlib
481 except ImportError:
482 return None
483
484 with open(fn, 'rb') as f:
485 pl = plistlib.load(f)
486 release = pl['ProductVersion']
487 versioninfo = ('', '', '')
488 machine = os.uname().machine
489 if machine in ('ppc', 'Power Macintosh'):
490 # Canonical name
491 machine = 'PowerPC'
492
493 return release, versioninfo, machine
494
495
496def mac_ver(release='', versioninfo=('', '', ''), machine=''):

Callers 1

mac_verFunction · 0.85

Calls 3

openFunction · 0.70
existsMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…