[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Broke my IDLE!

Adam W.

2/5/2008 4:50:00 PM

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.
7 Answers

Adam W.

2/5/2008 5:06:00 PM

0

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?

Kev

2/5/2008 5:51:00 PM

0

On Feb 5, 5:05 pm, "Adam W." <AWasile...@gmail.com> wrote:
> 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.

Chris

2/5/2008 7:28:00 PM

0

On Feb 5, 7:05 pm, "Adam W." <AWasile...@gmail.com> wrote:
> 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

Adam W.

2/5/2008 7:35:00 PM

0

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.

On Feb 5, 2:27 pm, Chris <cwi...@gmail.com> wrote:
> On Feb 5, 7:05 pm, "Adam W." <AWasile...@gmail.com> wrote:
>
>
>
>
>
> > 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- Hide quoted text -
>
> - Show quoted text -

Steve Holden

2/5/2008 7:41:00 PM

0

Adam W. wrote:
> 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...

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
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...

Mike Hjorleifsson

2/6/2008 4:13:00 AM

0

Anyone know how to get idle working on OSX 10.5 (Leopard) ?

Kev

2/6/2008 7:38:00 PM

0

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