Message32665
IDLE freezes after running a script in a new window. I'm writing a wxPython script, which runs well until the window is closed, then IDLE freezes (shell and all open windows) and I have to kill the process. It is a tutorial script, so nothing too fancy:
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title)
menubar = wx.MenuBar()
file = wx.Menu()
edit = wx.Menu()
help = wx.Menu()
file.Append(101, "&New")
file.Append(102, "&Open", "Open a new document")
fileRecent = wx.Menu()
fileRecent.Append(10301, "First Item")
fileRecent.Append(10302, "Second Item")
file.AppendMenu(103, "Open &Recent", fileRecent)
file.Append(104, "&Save", "Save the document")
file.AppendSeparator()
file.Append(105, "E&xit", "Close this window")
edit.Append(201, "Check 1", "Check 1 Tooltip", wx.ITEM_CHECK)
edit.Append(202, "Check 2", "Check 2 Tooltip", wx.ITEM_CHECK)
menubar.Append(file, "&File")
menubar.Append(edit, "&Edit")
menubar.Append(help, "&Help")
self.SetMenuBar(menubar)
self.CreateStatusBar()
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, -1, "My Frame")
frame.Center()
frame.Show(True)
return True
app = MyApp(0)
app.MainLoop()
-----------------------------------
It should be noted that usually it freezes after running the script once, but sometimes I can run it a second time before it freezes IDLE. It doesn't seem to freeze using only core Python, only when using wxWidgets.
Here are some versions:
Ubuntu Gusty
Python version 2.5.1
IDLE version 1.2.1 |
|
Date |
User |
Action |
Args |
2007-08-23 14:59:19 | admin | link | issue1777398 messages |
2007-08-23 14:59:19 | admin | create | |
|