mirror of
https://github.com/python/cpython.git
synced 2025-09-07 09:21:27 +00:00
Kill execfile(), use exec() instead
This commit is contained in:
parent
41eaedd361
commit
016880229a
98 changed files with 179 additions and 341 deletions
|
@ -123,8 +123,9 @@ import tempfile
|
|||
fp = tempfile.NamedTemporaryFile()
|
||||
fp.write(program)
|
||||
fp.flush()
|
||||
script = open(tfn).read()
|
||||
if DFLAG:
|
||||
import pdb
|
||||
pdb.run('execfile(%r)' % (tfn,))
|
||||
pdb.run(script)
|
||||
else:
|
||||
execfile(tfn)
|
||||
exec(script)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue