diff --git a/py/path/local.py b/py/path/local.py index c464abeba..e6d5c5606 100644 --- a/py/path/local.py +++ b/py/path/local.py @@ -535,7 +535,7 @@ class LocalPath(FSBase): mod.__file__ = str(self) sys.modules[modname] = mod try: - execfile(str(self), mod.__dict__) + py.builtin.execfile(str(self), mod.__dict__) except: del sys.modules[modname] raise diff --git a/py/rest/latex.py b/py/rest/latex.py index d2c6f7f1f..67816f128 100644 --- a/py/rest/latex.py +++ b/py/rest/latex.py @@ -81,7 +81,7 @@ def process_configfile(configfile, debug=False): path = configfile.dirpath() configfile_dic = {} py.std.sys.path.insert(0, str(path)) - execfile(str(configfile), configfile_dic) + py.builtin.execfile(str(configfile), configfile_dic) pagebreak = configfile_dic.get("pagebreak", False) rest_sources = [py.path.local(p) for p in configfile_dic['rest_sources']]