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

Method load_file

Lib/modulefinder.py:165–170  ·  view source on GitHub ↗
(self, pathname)

Source from the content-addressed store, hash-verified

163 self.load_module('__main__', fp, pathname, stuff)
164
165 def load_file(self, pathname):
166 dir, name = os.path.split(pathname)
167 name, ext = os.path.splitext(name)
168 with io.open_code(pathname) as fp:
169 stuff = (ext, "rb", _PY_SOURCE)
170 self.load_module(name, fp, pathname, stuff)
171
172 def import_hook(self, name, caller=None, fromlist=None, level=-1):
173 self.msg(3, "import_hook", name, caller, fromlist, level)

Callers 2

testFunction · 0.95
mainFunction · 0.95

Calls 3

load_moduleMethod · 0.95
splitextMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected