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

Function _mac_ver_xml

Lib/platform.py:460–479  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

458
459
460def _mac_ver_xml():
461 fn = '/System/Library/CoreServices/SystemVersion.plist'
462 if not os.path.exists(fn):
463 return None
464
465 try:
466 import plistlib
467 except ImportError:
468 return None
469
470 with open(fn, 'rb') as f:
471 pl = plistlib.load(f)
472 release = pl['ProductVersion']
473 versioninfo = ('', '', '')
474 machine = os.uname().machine
475 if machine in ('ppc', 'Power Macintosh'):
476 # Canonical name
477 machine = 'PowerPC'
478
479 return release, versioninfo, machine
480
481
482def 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