diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-12 00:43:29 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-12 00:43:29 (GMT) |
commit | 016880229a369a3fb419f3eed28b6db7c342fe71 (patch) | |
tree | 9b11de5c197bc556dd515e035327673765cd4871 /Mac/Modules/mlte | |
parent | 41eaedd3613cebc83e6b9925499369992c7a7770 (diff) | |
download | cpython-016880229a369a3fb419f3eed28b6db7c342fe71.zip cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.gz cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.bz2 |
Kill execfile(), use exec() instead
Diffstat (limited to 'Mac/Modules/mlte')
-rw-r--r-- | Mac/Modules/mlte/mltescan.py | 2 | ||||
-rw-r--r-- | Mac/Modules/mlte/mltesupport.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py index adecb4f..9566ad7 100644 --- a/Mac/Modules/mlte/mltescan.py +++ b/Mac/Modules/mlte/mltescan.py @@ -20,7 +20,7 @@ def main(): scanner.gentypetest(SHORT+"typetest.py") scanner.close() print "=== Testing definitions output code ===" - execfile(defsoutput, {}, {}) + exec(open(defsoutput).read(), {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/mlte/mltesupport.py b/Mac/Modules/mlte/mltesupport.py index 8dcbed5..4adde0d 100644 --- a/Mac/Modules/mlte/mltesupport.py +++ b/Mac/Modules/mlte/mltesupport.py @@ -128,7 +128,7 @@ OptRectPtr = OpaqueByValueType("Rect *", "OptRectPtr") UniChar = Type("UniChar", "h") # XXXX For now... # ADD object type here -execfile("mltetypetest.py") +exec(open("mltetypetest.py").read()) # Our (opaque) objects @@ -166,7 +166,7 @@ TXNObject_methods = [] TXNFontMenuObject_methods = [] # ADD _methods initializer here -execfile(INPUTFILE) +exec(open(INPUTFILE).read()) # add the populated lists to the generator groups |