MCPcopy Index your code
hub / github.com/python/cpython / load_tail

Method load_tail

Lib/modulefinder.py:245–258  ·  view source on GitHub ↗
(self, q, tail)

Source from the content-addressed store, hash-verified

243 raise ImportError("No module named " + qname)
244
245 def load_tail(self, q, tail):
246 self.msgin(4, "load_tail", q, tail)
247 m = q
248 while tail:
249 i = tail.find('.')
250 if i < 0: i = len(tail)
251 head, tail = tail[:i], tail[i+1:]
252 mname = "%s.%s" % (m.__name__, head)
253 m = self.import_module(head, mname, m)
254 if not m:
255 self.msgout(4, "raise ImportError: No module named", mname)
256 raise ImportError("No module named " + mname)
257 self.msgout(4, "load_tail ->", m)
258 return m
259
260 def ensure_fromlist(self, m, fromlist, recursive=0):
261 self.msg(4, "ensure_fromlist", m, fromlist, recursive)

Callers 1

import_hookMethod · 0.95

Calls 4

msginMethod · 0.95
import_moduleMethod · 0.95
msgoutMethod · 0.95
findMethod · 0.45

Tested by

no test coverage detected