MCPcopy Create free account
hub / github.com/ipython/ipython / execfile

Function execfile

IPython/utils/py3compat.py:164–168  ·  view source on GitHub ↗
(fname, glob, loc=None, compiler=None)

Source from the content-addressed store, hash-verified

162MethodType = types.MethodType
163
164def execfile(fname, glob, loc=None, compiler=None):
165 loc = loc if (loc is not None) else glob
166 with open(fname, 'rb') as f:
167 compiler = compiler or compile
168 exec(compiler(f.read(), fname, 'exec'), glob, loc)
169
170# Refactor print statements in doctests.
171_print_statement_re = re.compile(r"\bprint (?P<expr>.*)$", re.MULTILINE)

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected