diff options
author | Guido van Rossum <guido@python.org> | 1999-01-08 15:31:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-01-08 15:31:07 (GMT) |
commit | 38df3c383d958066ad2f698091abe3eeeb6e4f26 (patch) | |
tree | 84d33403d9a0c0487423d8ae5ed13b14209e71da /Tools/idle | |
parent | c58f346374be696b6351a0b678fe5c3b33a7092c (diff) | |
download | cpython-38df3c383d958066ad2f698091abe3eeeb6e4f26.zip cpython-38df3c383d958066ad2f698091abe3eeeb6e4f26.tar.gz cpython-38df3c383d958066ad2f698091abe3eeeb6e4f26.tar.bz2 |
Paul Prescod's patches to allow the stack viewer to pop up when a
traceback is printed.
Diffstat (limited to 'Tools/idle')
-rw-r--r-- | Tools/idle/Bindings.py | 1 | ||||
-rw-r--r-- | Tools/idle/PyShell.py | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Tools/idle/Bindings.py b/Tools/idle/Bindings.py index dbca89a..e365032 100644 --- a/Tools/idle/Bindings.py +++ b/Tools/idle/Bindings.py @@ -44,6 +44,7 @@ menudefs = [ ('_Go to file/line', '<<goto-file-line>>'), ('_Open stack viewer', '<<open-stack-viewer>>'), ('_Debugger toggle', '<<toggle-debugger>>'), + ('_JIT Stack viewer toggle', '<<toggle-jit-stack-viewer>>' ), ]), ('help', [ ('_Help...', '<<help>>'), diff --git a/Tools/idle/PyShell.py b/Tools/idle/PyShell.py index 6df38c3..f484fb8 100644 --- a/Tools/idle/PyShell.py +++ b/Tools/idle/PyShell.py @@ -217,8 +217,13 @@ class ModifiedInterpreter(InteractiveInterpreter): raise else: self.showtraceback() + if self.tkconsole.jit_stack_view: + self.tkconsole.open_stack_viewer() except: self.showtraceback() + if self.tkconsole.jit_stack_view: + self.tkconsole.open_stack_viewer() + finally: self.tkconsole.endexecuting() @@ -265,6 +270,7 @@ class PyShell(OutputWindow): text.bind("<<open-stack-viewer>>", self.open_stack_viewer) text.bind("<<toggle-debugger>>", self.toggle_debugger) text.bind("<<open-python-shell>>", self.flist.open_shell) + text.bind("<<toggle-jit-stack-viewer>>", self.toggle_jit_stack_viewer) sys.stdout = PseudoFile(self, "stdout") sys.stderr = PseudoFile(self, "stderr") @@ -290,6 +296,11 @@ class PyShell(OutputWindow): else: self.open_debugger() + jit_stack_view = 0 + + def toggle_jit_stack_viewer( self, event=None): + self.jit_stack_view = not self.jit_stack_view + def close_debugger(self): db = self.interp.getdebugger() if db: |