[IPython-dev] Detecting GUI mainloop running in IPython

Brian Granger ellisonbg at gmail.com
Sun Jul 25 17:30:11 EDT 2010

On Sun, Jul 25, 2010 at 2:14 PM, Gael Varoquaux <
gael.varoquaux at normalesup.org> wrote:

> On Sun, Jul 25, 2010 at 11:05:53AM -1000, Eric Firing wrote:
> >> I believe that 1 is due to matplotlib registering an InputHook, but I
> >> cannot find where it is done. Also, does this seems to mean that under
> >> Linux GTK input hooks work for Wx (and they are nicer since they don't
> >> poll).
> >
> > No, mpl is not registering an InputHook, but pygtk is.  Maybe this is
> > having a side effect because wx on linux is a wrapper around gtk.
> Interesting. It's actually very nice. I wonder if IPython could use this
> to avoid the current polling loop in wx which is fairly annoying.
As you noted, on Linux, the gtk inputhook will work for wx (OK, there could
be wierd side cases that fail).  But, the reason the wx inputhook has to
poll is that wx does not support triggering events on file descriptor
reads/writes.  It is a limitation of wx.



> Gaël
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20100725/2ccfaa7a/attachment.html>

More information about the IPython-dev mailing list