From 2f91fc710f2c66b5a04b2de9a5eb2bf5675784ab 2007-03-19 16:00:44 From: walter.doerwald Date: 2007-03-19 16:00:44 Subject: [PATCH] Try to get igrid to run with -wthread. This at least delays the problem until one of multiple igrid browsers is closed. --- diff --git a/IPython/Extensions/igrid.py b/IPython/Extensions/igrid.py index 6178284..591357d 100644 --- a/IPython/Extensions/igrid.py +++ b/IPython/Extensions/igrid.py @@ -780,6 +780,19 @@ class IGridFrame(wx.Frame): dlg.Destroy() +class App(wx.App): + def __init__(self, input): + self.input = input + wx.App.__init__(self) + + def OnInit(self): + frame = IGridFrame(self, self.input) + frame.Show() + self.SetTopWindow(frame) + frame.Raise() + return True + + class igrid(ipipe.Display): """ This is a wx-based display object that can be used instead of ``ibrowse`` @@ -787,10 +800,6 @@ class igrid(ipipe.Display): """ def display(self): self.returnobj = None - app = wx.App() - self.frame = IGridFrame(self, self.input) - self.frame.Show() - app.SetTopWindow(self.frame) - self.frame.Raise() + app = App(self.input) app.MainLoop() return self.returnobj