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

@ -99,7 +99,7 @@ for dir in os.curdir, os.environ['HOME']:
rcfile = os.path.join(dir, '.newslistrc.py')
if os.path.exists(rcfile):
print(rcfile)
execfile(rcfile)
exec(open(rcfile).read())
break
from nntplib import NNTP

View file

@ -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)