Python IDLE Not Working

Gnat picture Gnat · Nov 17, 2014 · Viewed 14.3k times · Source

I've recently been installing, uninstalling, and reinstalling different versions of Python and Pygame to get both working, as well as IDLE. The first issue I had was with Python's IDLE not working, which happened after uninstalling a 3.4~ version of Python for a 3.2 version to be able to use the Pygame module.

For a while, things worked fine, but then I uninstalled 3.2 of both , swapping to 3.1.3 to try using a different IDE. After realizing that pygame didn't work properly in other IDE's, I switched back to 3.2 and found that IDLE no longer worked. I tried uninstalling and reinstalling several times to no avail.

I tried to delete registry keys related to python to do a complete reinstall, but that doesn't seem to have done anything either.

By not working, I mean that IDLE simply doesn't open when prompted, when executing it from C:\Python32\Lib\idlelib, and also when right clicking on a script and selecting "Edit with IDLE" Running it from the command line, it gives the following error:

`C:\>Python32\python.exe C:\Python32\Lib\idlelib\idle.py
Traceback (most recent call last):
File "C:\Python32\Lib\idlelib\idle.py", line 11, in <module>
    idlelib.PyShell.main()
File "C:\Python32\Lib\idlelib\PyShell.py", line 1386, in main
    flist.new()
File "C:\Python32\Lib\idlelib\FileList.py", line 49, in new
    return self.EditorWindow(self, filename)
File "C:\Python32\Lib\idlelib\PyShell.py", line 107, in __init__
    EditorWindow.__init__(self, *args)
File "C:\Python32\Lib\idlelib\EditorWindow.py", line 134, in __init__
    self.apply_bindings()
File "C:\Python32\Lib\idlelib\EditorWindow.py", line 977, in apply_bindings
    text.event_add(event, *keylist)
File "C:\Python32\Lib\idlelib\MultiCall.py", line 359, in event_add
    widget.event_add(self, virtual, seq)
File "C:\Python32\Lib\tkinter\__init__.py", line 1353, in event_add
    self.tk.call(args)
_tkinter.TclError: bad event type or keysym "Shift"`

Answer

Gnat picture Gnat · Nov 17, 2014

Alright, here's the solution that worked for me:

"Try deleting the contents of the .idlerc folder in your profile. To open the folder just type and enter %USERPROFILE%.idlerc."

Link to the other question in full: https://serverfault.com/questions/288457/python-idle-just-doesnt-start-up