broke IDLE while defining a key-binding scheme

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian van den Broek

    #1

    broke IDLE while defining a key-binding scheme

    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\Li b\idlelib\idle. py", line 21, in ?
    idlelib.PyShell .main()
    File "C:\PYTHON24\li b\idlelib\PyShe ll.py", line 1355, in main
    if not flist.open_shel l():
    File "C:\PYTHON24\li b\idlelib\PyShe ll.py", line 275, in open_shell
    self.pyshell = PyShell(self)
    File "C:\PYTHON24\li b\idlelib\PyShe ll.py", line 793, in __init__
    OutputWindow.__ init__(self, flist, None, None)
    File "C:\PYTHON24\li b\idlelib\Outpu tWindow.py", line 16, in __init__
    EditorWindow.__ init__(self, *args)
    File "C:\PYTHON24\li b\idlelib\Edito rWindow.py", line 108, in __init__
    self.apply_bind ings()
    File "C:\PYTHON24\li b\idlelib\Edito rWindow.py", line 774, in
    apply_bindings
    text.event_add( event, *keylist)
    File "C:\PYTHON24\li b\lib-tk\Tkinter.py", line 1299, in event_add
    self.tk.call(ar gs)
    _tkinter.TclErr or: bad event type or keysym "tab"[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    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

Working...