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

Method _search_registry

Lib/importlib/_bootstrap_external.py:688–700  ·  view source on GitHub ↗
(cls, fullname)

Source from the content-addressed store, hash-verified

686
687 @classmethod
688 def _search_registry(cls, fullname):
689 if cls.DEBUG_BUILD:
690 registry_key = cls.REGISTRY_KEY_DEBUG
691 else:
692 registry_key = cls.REGISTRY_KEY
693 key = registry_key.format(fullname=fullname,
694 sys_version='%d.%d' % sys.version_info[:2])
695 try:
696 with cls._open_registry(key) as hkey:
697 filepath = winreg.QueryValue(hkey, '')
698 except OSError:
699 return None
700 return filepath
701
702 @classmethod
703 def find_spec(cls, fullname, path=None, target=None):

Callers 1

find_specMethod · 0.80

Calls 3

_open_registryMethod · 0.80
QueryValueMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected