[IPython-dev] Detecting GUI mainloop running in IPython

Brian Granger ellisonbg@gmail....
Sun Jul 25 16:30:11 CDT 2010


On Sun, Jul 25, 2010 at 2:14 PM, Gael Varoquaux <
gael.varoquaux@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.

Cheers,

Brian

> Gaël
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@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@calpoly.edu
ellisonbg@gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20100725/2ccfaa7a/attachment.html 


More information about the IPython-dev mailing list