Show More
@@ -73,7 +73,8 b' if sys.version_info[0] >= 3:' | |||||
73 |
|
73 | |||
74 | def execfile(fname, glob, loc=None): |
|
74 | def execfile(fname, glob, loc=None): | |
75 | loc = loc if (loc is not None) else glob |
|
75 | loc = loc if (loc is not None) else glob | |
76 | exec compile(open(fname, 'rb').read(), fname, 'exec') in glob, loc |
|
76 | with open(fname, 'rb') as f: | |
|
77 | exec compile(f.read(), fname, 'exec') in glob, loc | |||
77 |
|
78 | |||
78 | # Refactor print statements in doctests. |
|
79 | # Refactor print statements in doctests. | |
79 | _print_statement_re = re.compile(r"\bprint (?P<expr>.*)$", re.MULTILINE) |
|
80 | _print_statement_re = re.compile(r"\bprint (?P<expr>.*)$", re.MULTILINE) |
General Comments 0
You need to be logged in to leave comments.
Login now