Kill execfile(), use exec() instead
diff --git a/Lib/plat-mac/appletrawmain.py b/Lib/plat-mac/appletrawmain.py
index 6f2eacb..5c09e2d 100644
--- a/Lib/plat-mac/appletrawmain.py
+++ b/Lib/plat-mac/appletrawmain.py
@@ -41,7 +41,7 @@
#
sys.argv[0] = __file__
del argvemulator, os, sys, _dir
- execfile(__file__)
+ exec(open(__file__).read())
else:
__file__ = os.path.join(_dir, '__main__.pyc')
if os.path.exists(__file__):
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py
index e833add..d8186c1 100755
--- a/Lib/plat-mac/bundlebuilder.py
+++ b/Lib/plat-mac/bundlebuilder.py
@@ -322,7 +322,12 @@
import argvemulator, os
argvemulator.ArgvCollector().mainloop()
-execfile(os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s"))
+fp = os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s")
+try:
+ script = fp.read()
+finally:
+ fp.close()
+exec(script)
"""
#