MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / find_module

Method find_module

tools/python-3.11.9-amd64/Lib/pkgutil.py:213–226  ·  view source on GitHub ↗
(self, fullname, path=None)

Source from the content-addressed store, hash-verified

211 self.path = path
212
213 def find_module(self, fullname, path=None):
214 # Note: we ignore 'path' argument since it is only used via meta_path
215 subname = fullname.split(".")[-1]
216 if subname != fullname and self.path is None:
217 return None
218 if self.path is None:
219 path = None
220 else:
221 path = [os.path.realpath(self.path)]
222 try:
223 file, filename, etc = imp.find_module(subname, path)
224 except ImportError:
225 return None
226 return ImpLoader(fullname, file, filename, etc)
227
228 def iter_modules(self, prefix=''):
229 if self.path is None or not os.path.isdir(self.path):

Callers 1

_get_specFunction · 0.45

Calls 3

ImpLoaderClass · 0.85
realpathMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected