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

Christopher Barker Chris.Barker at noaa.gov
Thu Feb 18 17:24:40 EST 2010


Thanks for everyone's work on this.

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.

So:

> - 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.

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 at noaa.gov



More information about the IPython-dev mailing list