Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 23932:eab8eca9ec51 legacy-trunk
1. Debugger Breakpoints, finish implementation
2. Debugger Clear Breakpoints, implement
3. Nice yellow breakpoints for Chui :)
| author | Kurt B. Kaiser <kbk@shore.net> |
|---|---|
| date | Thu, 20 Jun 2002 04:01:47 +0000 |
| parents | 832f0501148b |
| children | edd7c0146ac8 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Thu Jun 20 03:40:16 2002 +0000 +++ b/Lib/idlelib/PyShell.py Thu Jun 20 04:01:47 2002 +0000 @@ -96,10 +96,13 @@ def __init__(self, *args): apply(EditorWindow.__init__, (self,) + args) self.text.bind("<<set-breakpoint-here>>", self.set_breakpoint_here) + self.text.bind("<<clear-breakpoint-here>>", + self.clear_breakpoint_here) self.text.bind("<<open-python-shell>>", self.flist.open_shell) rmenu_specs = [ - ("Set breakpoint here", "<<set-breakpoint-here>>"), + ("Set Breakpoint", "<<set-breakpoint-here>>"), + ("Clear Breakpoint", "<<clear-breakpoint-here>>") ] def set_breakpoint_here(self, event=None): @@ -108,6 +111,12 @@ return self.flist.pyshell.interp.debugger.set_breakpoint_here(self) + def clear_breakpoint_here(self, event=None): + if not self.flist.pyshell or not self.flist.pyshell.interp.debugger: + self.text.bell() + return + self.flist.pyshell.interp.debugger.clear_breakpoint_here(self) + class PyShellFileList(FileList):
