Broke my IDLE!

A

Adam W.

I did a stupid thing and "wrote in" <Up-Arrow> under the advance key
bindings section, and after hitting apply I got a load of exceptions.
Now my shell wont open and my IDEL wont start anymore.... I
uninstalled and reinstalled Python with no luck, the whacked settings
must be lingering around somewhere. Its python 2.5.1 and its on Vista
if that helps.
 
A

Adam W.

Tried running IDEL from the command prompt to get this:

Traceback (most recent call last):
File "c:\Python25\Lib\idlelib\idle.pyw", line 21, in <module>
idlelib.PyShell.main()
File "c:\Python25\lib\idlelib\PyShell.py", line 1404, in main
shell = flist.open_shell()
File "c:\Python25\lib\idlelib\PyShell.py", line 275, in open_shell
self.pyshell = PyShell(self)
File "c:\Python25\lib\idlelib\PyShell.py", line 813, in __init__
OutputWindow.__init__(self, flist, None, None)
File "c:\Python25\lib\idlelib\OutputWindow.py", line 16, in __init__
EditorWindow.__init__(self, *args)
File "c:\Python25\lib\idlelib\EditorWindow.py", line 125, in
__init__
self.apply_bindings()
File "c:\Python25\lib\idlelib\EditorWindow.py", line 900, in
apply_bindings
text.event_add(event, *keylist)
File "c:\Python25\lib\idlelib\MultiCall.py", line 345, in event_add
widget.event_add(self, virtual, seq)
File "c:\Python25\lib\lib-tk\Tkinter.py", line 1357, in event_add
self.tk.call(args)
_tkinter.TclError: extra characters after detail in binding

What do I need to edit and change?
 
K

kdwyer

Tried running IDEL from the command prompt to get this:

Traceback (most recent call last):
File "c:\Python25\Lib\idlelib\idle.pyw", line 21, in <module>
idlelib.PyShell.main()
File "c:\Python25\lib\idlelib\PyShell.py", line 1404, in main
shell = flist.open_shell()
File "c:\Python25\lib\idlelib\PyShell.py", line 275, in open_shell
self.pyshell = PyShell(self)
File "c:\Python25\lib\idlelib\PyShell.py", line 813, in __init__
OutputWindow.__init__(self, flist, None, None)
File "c:\Python25\lib\idlelib\OutputWindow.py", line 16, in __init__
EditorWindow.__init__(self, *args)
File "c:\Python25\lib\idlelib\EditorWindow.py", line 125, in
__init__
self.apply_bindings()
File "c:\Python25\lib\idlelib\EditorWindow.py", line 900, in
apply_bindings
text.event_add(event, *keylist)
File "c:\Python25\lib\idlelib\MultiCall.py", line 345, in event_add
widget.event_add(self, virtual, seq)
File "c:\Python25\lib\lib-tk\Tkinter.py", line 1357, in event_add
self.tk.call(args)
_tkinter.TclError: extra characters after detail in binding

What do I need to edit and change?

IIRC IDLE leaves some config files lying around in whatever was the
current directory when it was executed. I think they're named idle.rc
but I don't have a working install around to check on. It's possible
that you need to clear these out to remove the binding.
 
C

Chris

Tried running IDEL from the command prompt to get this:

Traceback (most recent call last):
File "c:\Python25\Lib\idlelib\idle.pyw", line 21, in <module>
idlelib.PyShell.main()
File "c:\Python25\lib\idlelib\PyShell.py", line 1404, in main
shell = flist.open_shell()
File "c:\Python25\lib\idlelib\PyShell.py", line 275, in open_shell
self.pyshell = PyShell(self)
File "c:\Python25\lib\idlelib\PyShell.py", line 813, in __init__
OutputWindow.__init__(self, flist, None, None)
File "c:\Python25\lib\idlelib\OutputWindow.py", line 16, in __init__
EditorWindow.__init__(self, *args)
File "c:\Python25\lib\idlelib\EditorWindow.py", line 125, in
__init__
self.apply_bindings()
File "c:\Python25\lib\idlelib\EditorWindow.py", line 900, in
apply_bindings
text.event_add(event, *keylist)
File "c:\Python25\lib\idlelib\MultiCall.py", line 345, in event_add
widget.event_add(self, virtual, seq)
File "c:\Python25\lib\lib-tk\Tkinter.py", line 1357, in event_add
self.tk.call(args)
_tkinter.TclError: extra characters after detail in binding

What do I need to edit and change?

Python25\Lib\idlelib\config-keys.def
 
A

Adam W.

I finally found away around it myself, I commented out line 1357 in lib
\lib-tk\Tkinter.py that told it to call the settings, after I did that
it fired right up, I went into the bindings and selected the default,
closed out, uncommented that line, and I was back in buisness.
 
S

Steve Holden

Adam said:
I finally found away around it myself, I commented out line 1357 in lib
\lib-tk\Tkinter.py that told it to call the settings, after I did that
it fired right up, I went into the bindings and selected the default,
closed out, uncommented that line, and I was back in buisness.
Slightly off-topic, but tangentially relevant and amusing if you haven't
seen it before.

http://burks.bton.ac.uk/burks/language/shoot.htm

I'm especially find of the 370 JCL entry, reminding me as it does of why
I left the world of corporate employment.

regards
Steve
 
K

kdwyer

Just to clarify my earlier comment...

IDLE (on Windows, at least) creates a folder called .idlerc in the
current directory when it is called. If you amend the key bindings
two files, config-keys.cfg and config-main.cfg are created. config-
keys.cfg contains the amended key bindings and config-main.cfg
contains the name of the key binding file if it is not the platform
default.

The config processing seems to happen in <python_root>/Lib/idlelib/
configHandler.py.

Sorry for the inaccuracy in the first post,

Cheers,

Kev
 

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

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top