Fix for issue #693

- Override older behavior of execfile_ with one with pyc patch
This commit is contained in:
Jeryn Mathew 2014-02-06 13:17:46 +05:30 committed by Jeryn Mathew
parent 8b49de4ad2
commit 2e84d68edb

View File

@ -344,7 +344,7 @@ if PY3:
print_ = getattr(builtins, "print")
def execfile_(fname, *args):
return exec_(compile(open(fname, 'rb').read(), fname, 'exec'), *args)
return exec_(_get_codeobj(fname), *args)
del builtins
@ -367,7 +367,10 @@ else:
raise tp, value, tb
""")
execfile_ = execfile
def execfile_(fname, *args):
""" Overriding PY2 execfile() implementation to support .pyc files """
return exec_(_get_codeobj(fname), *args)
def print_(*args, **kwargs):
"""The new-style print function."""