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

Function _import_from_directory

Lib/sysconfig/__init__.py:336–345  ·  view source on GitHub ↗
(path, name)

Source from the content-addressed store, hash-verified

334
335
336def _import_from_directory(path, name):
337 if name not in sys.modules:
338 import importlib.machinery
339 import importlib.util
340
341 spec = importlib.machinery.PathFinder.find_spec(name, [path])
342 module = importlib.util.module_from_spec(spec)
343 spec.loader.exec_module(module)
344 sys.modules[name] = module
345 return sys.modules[name]
346
347
348def _get_sysconfigdata_name():

Callers 1

_get_sysconfigdataFunction · 0.85

Calls 2

find_specMethod · 0.45
exec_moduleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…