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

Method _load_dynamic

Lib/test/test_import/__init__.py:2744–2756  ·  view source on GitHub ↗

Load an extension module.

(self, name, path)

Source from the content-addressed store, hash-verified

2742 self.addCleanup(clean_up)
2743
2744 def _load_dynamic(self, name, path):
2745 """
2746 Load an extension module.
2747 """
2748 # This is essentially copied from the old imp module.
2749 from importlib._bootstrap import _load
2750 loader = self.LOADER(name, path)
2751
2752 # Issue bpo-24748: Skip the sys.modules check in _load_module_shim;
2753 # always load new extension.
2754 spec = importlib.util.spec_from_file_location(name, path,
2755 loader=loader)
2756 return _load(spec)
2757
2758 def load(self, name):
2759 try:

Callers 3

loadMethod · 0.95
re_loadMethod · 0.95

Calls 1

_loadFunction · 0.90

Tested by 1