Kill execfile(), use exec() instead
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index f78935d..8d2cea9 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -14,7 +14,7 @@
scanner.scan()
scanner.close()
print "=== Testing definitions output code ==="
- execfile(defsoutput, {}, {})
+ exec(open(defsoutput).read(), {}, {})
print "=== Done scanning and generating, now importing the generated code... ==="
import winsupport
print "=== Done. It's up to you to compile it now! ==="
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 08a0379..2cadbdc 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -191,7 +191,7 @@
# Create and populate the lists
functions = []
methods = []
-execfile(INPUTFILE)
+exec(open(INPUTFILE).read())
# Add manual routines for converting integer WindowPtr's (as returned by
# various event routines) and Dialog objects to a WindowObject.
@@ -211,8 +211,8 @@
# And add the routines that access the internal bits of a window struct. They
# are currently #defined in Windows.h, they will be real routines in Copland
-# (at which time this execfile can go)
-execfile(EDITFILE)
+# (at which time this exec can go)
+exec(open(EDITFILE).read())
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)