Lines Matching refs:modules
45 First, sys.modules is checked to see if the module was already imported. If
46 so, then sys.modules[name].__spec__ is returned. If that happens to be
48 sys.modules, then sys.meta_path is searched for a suitable spec with the
57 if name not in sys.modules:
60 module = sys.modules[name]
76 First, sys.modules is checked to see if the module was already imported. If
77 so, then sys.modules[name].__spec__ is returned. If that happens to be
79 sys.modules, then sys.meta_path is searched for a suitable spec with the
91 if fullname not in sys.modules:
105 module = sys.modules[fullname]
120 is_reload = name in sys.modules
122 module = sys.modules.get(name)
128 # This must be done before putting the module in sys.modules
131 sys.modules[name] = module
137 del sys.modules[name]
186 name. The module passed in to the function is either from sys.modules if
194 subsequently removed from sys.modules.
233 # in sys.modules.
249 # object was put into sys.modules.
250 if original_name in sys.modules:
251 if id(self) != id(sys.modules[original_name]):
253 "substituted in sys.modules during a lazy "