Kill execfile(), use exec() instead

This commit is contained in:
Neal Norwitz 2007-08-12 00:43:29 +00:00
parent 41eaedd361
commit 016880229a
98 changed files with 179 additions and 341 deletions

View file

@ -1164,7 +1164,12 @@ see no sign that the breakpoint was reached.
self._wait_for_mainpyfile = 1
self.mainpyfile = self.canonic(filename)
self._user_requested_quit = 0
statement = 'execfile( "%s")' % filename
fp = open(filename)
try:
script = fp.read()
finally:
fp.close()
statement = 'exec("%s")' % script
self.run(statement)
# Simplified interface