Lines Matching defs:module
12 import _imp # Just the builtin component, NOT the full Python module
22 # a second copy of the module.
74 """Return the loader for the specified module.
109 """Import a module.
132 def reload(module):
133 """Reload the module and return it.
135 The module must have been successfully imported before.
139 name = module.__spec__.name
142 name = module.__name__
144 raise TypeError("reload() argument must be a module")
146 if sys.modules.get(name) is not module:
147 msg = "module {} not in sys.modules"
151 _RELOADING[name] = module
165 target = module
166 spec = module.__spec__ = _bootstrap._find_spec(name, pkgpath, target)
168 raise ModuleNotFoundError(f"spec not found for the module {name!r}", name=name)
169 _bootstrap._exec(spec, module)
170 # The module may have replaced itself in sys.modules!