broke IDLE while defining a key-binding scheme

  • Thread starter Brian van den Broek
  • Start date

Brian van den Broek

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 instead. The
DOS-console this brings up displays:

Traceback (most recent call last):
File "C:\Python24\Lib\idlelib\", line 21, in ?
File "C:\PYTHON24\lib\idlelib\", line 1355, in main
if not flist.open_shell():
File "C:\PYTHON24\lib\idlelib\", line 275, in open_shell
self.pyshell = PyShell(self)
File "C:\PYTHON24\lib\idlelib\", line 793, in __init__
OutputWindow.__init__(self, flist, None, None)
File "C:\PYTHON24\lib\idlelib\", line 16, in __init__
EditorWindow.__init__(self, *args)
File "C:\PYTHON24\lib\idlelib\", line 108, in __init__
File "C:\PYTHON24\lib\idlelib\", line 774, in
text.event_add(event, *keylist)
File "C:\PYTHON24\lib\lib-tk\", line 1299, in event_add
_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

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

Thanks and best,

Brian vdB

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question