summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-11 14:46:55 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-11 14:46:55 (GMT)
commit9016fcf41c37fcd3c7d4bac95f8d3e03416ecd20 (patch)
tree591b05824db6d3058c7fb59df65719dbd03f62f1
parentdc5066ee814df9fa79243adc2adcca73a0b87287 (diff)
downloadcpython-9016fcf41c37fcd3c7d4bac95f8d3e03416ecd20.zip
cpython-9016fcf41c37fcd3c7d4bac95f8d3e03416ecd20.tar.gz
cpython-9016fcf41c37fcd3c7d4bac95f8d3e03416ecd20.tar.bz2
Bind ESC to close-window.
-rw-r--r--Tools/idle/Debugger.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/idle/Debugger.py b/Tools/idle/Debugger.py
index 24a7376..d155ec8 100644
--- a/Tools/idle/Debugger.py
+++ b/Tools/idle/Debugger.py
@@ -18,7 +18,7 @@ class Debugger(bdb.Bdb):
self.pyshell = pyshell
self.make_gui()
- def close(self):
+ def close(self, event=None):
if self.interacting:
self.top.bell()
return
@@ -51,6 +51,7 @@ class Debugger(bdb.Bdb):
self.top.wm_title("Debug Control")
self.top.wm_iconname("Debug")
top.wm_protocol("WM_DELETE_WINDOW", self.close)
+ self.top.bind("<Escape>", self.close)
#
self.bframe = bframe = Frame(top)
self.bframe.pack(anchor="w")