import marshal
import re
+if hasattr(Win, "FrontNonFloatingWindow"):
+ MyFrontWindow = Win.FrontNonFloatingWindow
+else:
+ MyFrontWindow = Win.FrontWindow
+
+
try:
import Wthreading
except ImportError:
else:
PyDebugger.startfromhere()
elif not haveThreading:
- MacOS.EnableAppswitch(0)
+ if hasattr(MacOS, 'EnableAppswitch'):
+ MacOS.EnableAppswitch(0)
try:
if profiling:
import profile, ProfileBrowser
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):
return string.join(string.split(modname, '.'), '_')
def findeditor(topwindow, fromtop = 0):
- wid = Win.FrontWindow()
+ wid = MyFrontWindow()
if not fromtop:
if topwindow.w and wid == topwindow.w.wid:
wid = topwindow.w.wid.GetNextWindow()