[IPython-dev] [matplotlib-devel] Interactive wx/pylab with no threads (PyOS_InputHook)

Gael Varoquaux gael.varoquaux at normalesup.org
Mon Feb 9 01:29:45 EST 2009

On Sun, Feb 08, 2009 at 04:08:31PM -0800, Brian Granger wrote:
> * In the current matplotlib backend wx.Yield() is called in a way that
> is not safe as far as protecting against recursive calls to Yield.  I
> think it should be called in this way:

> app = wx.GetApp()
> if app is not None:
>   app.Yield(True)

The problem I see with this approach is that arbitrary wx programs will
always be doing this. The matplotlib guys can fix matplotib not to do
this. I can fix Mayavi not to do this, but there are many more wx
programs. And anyhow, most of the time, Yield should not be called, as it
is a hack. Unfortunately, you often end up having to call it. :(


More information about the IPython-dev mailing list