summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE/PyEdit.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Tools/IDE/PyEdit.py')
-rw-r--r--Mac/Tools/IDE/PyEdit.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py
index 828b697..2117fc4 100644
--- a/Mac/Tools/IDE/PyEdit.py
+++ b/Mac/Tools/IDE/PyEdit.py
@@ -1128,7 +1128,8 @@ def execstring(pytext, globals, locals, filename="<string>", debugging=0,
else:
PyDebugger.startfromhere()
elif not haveThreading:
- MacOS.EnableAppswitch(0)
+ if hasattr(MacOS, 'EnableAppswitch'):
+ MacOS.EnableAppswitch(0)
try:
if profiling:
import profile, ProfileBrowser
@@ -1145,7 +1146,8 @@ def execstring(pytext, globals, locals, filename="<string>", debugging=0,
exec code in globals, locals
finally:
if not haveThreading:
- MacOS.EnableAppswitch(-1)
+ if hasattr(MacOS, 'EnableAppswitch'):
+ MacOS.EnableAppswitch(-1)
except W.AlertError, detail:
raise W.AlertError, detail
except (KeyboardInterrupt, BdbQuit):