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

Function win32_edition

Lib/platform.py:387–400  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

385 return win32_edition() in ('IoTUAP', 'NanoServer', 'WindowsCoreHeadless', 'IoTEdgeOS')
386
387def win32_edition():
388 try:
389 import winreg
390 except ImportError:
391 pass
392 else:
393 try:
394 cvkey = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion'
395 with winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE, cvkey) as key:
396 return winreg.QueryValueEx(key, 'EditionId')[0]
397 except OSError:
398 pass
399
400 return None
401
402def _win32_ver(version, csd, ptype):
403 # Try using WMI first, as this is the canonical source of data

Callers 1

win32_is_iotFunction · 0.85

Calls 1

OpenKeyExMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…