]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of 1.9 (missed last time around):
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 10 Mar 2002 21:29:55 +0000 (21:29 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 10 Mar 2002 21:29:55 +0000 (21:29 +0000)
Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.

Mac/Tools/IDE/PyDebugger.py

index 4bbac262ca2127e76748c502ea45e394d45f7ae8..74bfc74d34bd997db059eeeb2d816a06fc354c38 100644 (file)
@@ -496,7 +496,8 @@ class Debugger(bdb.Bdb):
                        self.w.panes.bottom.tracingmonitor.toggle()
                try:
                        try:
-                               MacOS.EnableAppswitch(0)
+                               if hasattr(MacOS, 'EnableAppswitch'):
+                                       MacOS.EnableAppswitch(0)
                                if self.quitting:
                                        # returning None is not enough, a former BdbQuit exception
                                        # might have been eaten by the print statement
@@ -512,7 +513,8 @@ class Debugger(bdb.Bdb):
                                print 'bdb.Bdb.dispatch: unknown debugging event:', `event`
                                return self.trace_dispatch
                        finally:
-                               MacOS.EnableAppswitch(-1)
+                               if hasattr(MacOS, 'EnableAppswitch'):
+                                       MacOS.EnableAppswitch(-1)
                except KeyboardInterrupt:
                        self.set_step()
                        return self.trace_dispatch