[IPython-dev] GUI support: conflicts between IPython 0.11 and Matplotlib/ETS

Brian Granger ellisonbg.net@gmail....
Fri Feb 26 11:47:00 CST 2010


I had a thought. It seems that it's really impossible (or at least
> impractical) to monkey-patch the GUI toolkits such that you can run a
> regular old unmodified app exactly the same way inside and outside of
> ipython. Gael's right -- that way lies loss of hair (and I"ve lost
> enough in the last ten years as it is).
> However, as it happens, I've been using ipython for a wx GUI app of mine
> (with no ETS or MPL), and it sort-of-works, and also locks up and
> crashes fairly regularly. So the threading solution isn't really robust
> either. Also, when wx starts using Cocoa on OS-X, putting the GUI in
> another thread won't be an option anymore anyway.
The old threaded code is a train wreck - it is not thread safe in the least
and we have to do crazy hack to get Ctrl-C to work across threads.  The
result is, well, an eventual train wreck.

> > - non-threaded gui support with pyos_inputhook, that would require
> > some code changes.  If this can give a really robust solution and the
> > needed changes aren't too intrusive, I could see matplotlib, ETS and
> > possibly others adding the necessary adaptation (especially if we
> > provide it in ipython already so for the users it ends up being almost
> > a one-liner).
> Exactly -- while you can't expect unmodified regular old wx code to
> work, we could provide alternative app startup code that a user can
> simply cut and past in, and then have an app that will work with and
> without ipython -- I think that's a fine solution.
Yes, this should be fairly easy to do.



> So for now, is there a sample, minimal wx app that works with the new
> pyos_inputhook code?
> -Chris
> --
> Christopher Barker, Ph.D.
> Oceanographer
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
> Chris.Barker@noaa.gov
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20100226/28eba64c/attachment-0001.html 

More information about the IPython-dev mailing list