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

Function _import_from_directory

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

Source from the content-addressed store, hash-verified

345
346
347def _import_from_directory(path, name):
348 if name not in sys.modules:
349 import importlib.machinery
350 import importlib.util
351
352 spec = importlib.machinery.PathFinder.find_spec(name, [path])
353 module = importlib.util.module_from_spec(spec)
354 spec.loader.exec_module(module)
355 sys.modules[name] = module
356 return sys.modules[name]
357
358
359def _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