| Store | Cart

broke IDLE while defining a key-binding scheme

From: Brian van den Broek <bva...@po-box.mcgill.ca>
Fri, 04 Feb 2005 22:21:47 -0500
Hi all,

IDLE refuses to launch, and I believe it is because I attempted to 
define a custom key-binding that it doesn't like.

I was recently defining a custom keybinding in IDLE 1.1 under Python 
2.4 on WinMe. (I was using the simpler of the two binding definition 
interfaces.) When done, I hit the buttons for 'OK' (or however it is 
labelled -- I cannot currently check), but the definition dialog 
remained open. After several tries, I hit cancel, and IDLE terminated. 
(Whereas I expected the definition interface to close and return my to 
my unsaved :-( session.)

Afterwards, IDLE refused to launch. I tried various things, including 
reboot and eventually tried to run idle.pyw (the target of various 
shortcuts, etc.) by clicking on it. Nothing. Ran idle.py instead. The 
DOS-console this brings up displays:

Traceback (most recent call last):
   File "C:\Python24\Lib\idlelib\idle.py", line 21, in ?
     idlelib.PyShell.main()
   File "C:\PYTHON24\lib\idlelib\PyShell.py", line 1355, in main
     if not flist.open_shell():
   File "C:\PYTHON24\lib\idlelib\PyShell.py", line 275, in open_shell
     self.pyshell = PyShell(self)
   File "C:\PYTHON24\lib\idlelib\PyShell.py", line 793, in __init__
     OutputWindow.__init__(self, flist, None, None)
   File "C:\PYTHON24\lib\idlelib\OutputWindow.py", line 16, in __init__
     EditorWindow.__init__(self, *args)
   File "C:\PYTHON24\lib\idlelib\EditorWindow.py", line 108, in __init__
     self.apply_bindings()
   File "C:\PYTHON24\lib\idlelib\EditorWindow.py", line 774, in 
apply_bindings
     text.event_add(event, *keylist)
   File "C:\PYTHON24\lib\lib-tk\Tkinter.py", line 1299, in event_add
     self.tk.call(args)
_tkinter.TclError: bad event type or keysym "tab"
 >>>

I read through the various bits of code pointed at in the traceback. 
But, I'm a Python hobbyist, and have barely gone further than 'Hello 
World' with Tkinter. So, I don't know what to do with the information 
in the traceback.

I've looked at a number of 'IDLE won't start threads' that google 
knows about, but didn't see anything I recognized as useful. 
(Admittedly, I didn't read every single google hit :-)

Further, the last line of the traceback makes me think mine might be a 
somewhat unusual case. The keybinding I was defining when the 
excrement hit the air-conditioning was to make Shift + TAB perform a 
dedent on a region.

I did a search for files names *.p* (STAR.pSTAR for those whose 
mail-readers will take the wildcards as mark-up) modified today, 
hoping to track down the line defining the keybinding and remove it, 
but came up empty.

So, I'm at the end of what I can usefully do by way of diagnosis and 
repair.

Suggestions? (Anything gratefully received, but I favour being taught 
to fish over being fed merely for today.)

Thanks and best,

Brian vdB

Recent Messages in this Thread
Brian van den Broek Feb 05, 2005 03:21 am
Brian van den Broek Feb 07, 2005 05:11 pm
Messages in this thread