On 02/09/09 05:38, Brian Granger wrote: > IPython and matplotlib devs, > > Over the weekend I have been playing around to see if it is possible > to do interactive GUI work with wx from IPython *without using > threads*. The idea here is to use PyOS_InputHook. Currently, recent > versions of PyQt4 and PyGTK do this and if we can get wx working, we > can probably get rid of IPython's subtle threaded shells that > currently allow interactive GUIs to work. > > I am attaching a Cython module that mostly works. Here is a simple > example that works in IPython (without the -wthread option!) [...] > I don't have any more time to work on this right now, but I at least > wanted to share my findings with both IPython and matplotlib devs. It > would be great if someone familiar with wx could try to figure out the > remaining issues. If there are no takers here, I might eventually see > if wxpython itself is interested in this code (that is probably where > it really belongs anyway).
This is cool! It works with mayavi, which is a pretty demanding test. I did run into problems with pyximport messing up on some imports but manually importing the inputhook.so fixed those. The interactive response is not snappy but it definitely works without a problem. One problem I can see with this is that while it does eliminate the threading, there are still issues with multiple toolkits. It would be neat if there were a system where you could mix toolkits too -- it looks like it should be possible to support this though. cheers, prabhu ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel