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

Method load_module

Lib/importlib/_bootstrap.py:1182–1198  ·  view source on GitHub ↗

Load a frozen module. This method is deprecated. Use exec_module() instead.

(cls, fullname)

Source from the content-addressed store, hash-verified

1180
1181 @classmethod
1182 def load_module(cls, fullname):
1183 """Load a frozen module.
1184
1185 This method is deprecated. Use exec_module() instead.
1186
1187 """
1188 # Warning about deprecation implemented in _load_module_shim().
1189 module = _load_module_shim(cls, fullname)
1190 info = _imp.find_frozen(fullname)
1191 assert info is not None
1192 _, ispkg, origname = info
1193 module.__origname__ = origname
1194 vars(module).pop('__file__', None)
1195 if ispkg:
1196 module.__path__ = []
1197 cls._fix_up_module(module)
1198 return module
1199
1200 @classmethod
1201 @_requires_frozen

Callers 2

_execFunction · 0.45

Calls 4

varsFunction · 0.85
_load_module_shimFunction · 0.70
popMethod · 0.45
_fix_up_moduleMethod · 0.45

Tested by

no test coverage detected