Sometimes IDLE crashes when trying to run GUI code. I already know the standard responses to this issue (use another editor, run from command line etc.).

What I'm interested in is why does it do this? Does anybody have any information (or a link to info) on why this issue occurs?

Thanks.

Here is one example I have:

Quit will quit the tcl interpreter of Tkinter!
If IDLE is used, then quit will freeze it, since IDLE uses Tkinter too!
Replace quit with destroy, destroy is used to destroy a particular
window in a multiwindow program.

Yeah, i get this a lot with wxPython. Something on the lines of
wx.App must be created first. And IDLE will not freeze, but it will not run the code again until you restart it.

Yeah, i get this a lot with wxPython. Something on the lines of
wx.App must be created first. And IDLE will not freeze, but it will not run the code again until you restart it.

Hmm, interesting, never had that happen. Can you show a small sample code where this happens? Also, what is your operatings system? Is it a particular version of wxPython? There were some buggy versions out about 2 years ago.

Also IDLE on Windows machines can have problems with certain firewall settings.

#Try this code!

import wx

"""The start of our wxPython GUI tutorial"""

app = wx.App(redirect=False) # here is the trick :)
window = wx.Frame(None, title = 'Sample GUI App')
btn = wx.Button(window)

window.Show()
app.MainLoop()

idle just got so many problems. Even on the linux box like ubuntu.
You cant rely on idle gui.
Thats a fact.!

This article has been dead for over six months. Start a new discussion instead.