[IPython-dev] New GUI integration in IPython
Tue Sep 8 11:46:56 CDT 2009
> In the following test, when I issue a plt.show() I can't get access to the
> IPython shell unless I close the plot window. Moreover If I call plt.show()
> without a plot command beforehand, I have to kill the shell and restart the
> session again.
> Seems like a bug or something getting wrong with my system.
> This is Fedora 11.
Can you retry with using
%gui -a qt
The -a flag tells IPython to create an application object, and then show
should work as expected.
Again, this is an issue with the event loop hacks that matplotlib currently
does. The current show function in matplotlib looks to see if an qt app has
been created, if not, they create one and start the event loop (which
blocks). This used to work because IPython used to monkey patch the
wx/qt/gtk event loops to be no-ops. These hacks are based on the older
threading approach and once matplotlib updates their code, all of this will
Could you bring these issues up on the matplotlib list?
> $ ipython
> Python 2.6 (r26:66714, Jun 8 2009, 16:07:26)
> Type "copyright", "credits" or "license" for more information.
> IPython 0.11.bzr.r1205 -- An enhanced Interactive Python.
> I: import matplotlib.pyplot as plt
> I: %gui qt
> I: plt.plot(range(10))
> O: [<matplotlib.lines.Line2D object at 0xacc386c>]
> I: plt.show()
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev