diff options
Diffstat (limited to 'Demo/scripts')
-rwxr-xr-x | Demo/scripts/newslist.py | 2 | ||||
-rwxr-xr-x | Demo/scripts/pp.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Demo/scripts/newslist.py b/Demo/scripts/newslist.py index 7038380..3d65a08 100755 --- a/Demo/scripts/newslist.py +++ b/Demo/scripts/newslist.py @@ -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 diff --git a/Demo/scripts/pp.py b/Demo/scripts/pp.py index 486986a..9010b7a 100755 --- a/Demo/scripts/pp.py +++ b/Demo/scripts/pp.py @@ -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) |