From: Gökhan S. <gok...@gm...> - 2009-09-08 19:46:11
|
Hello, The thread switches will be gone by the release of the new IPython. I am assuming that some extra work needs to be done on both sides in preparation to the new release. See the following test cases: ### This one locks the IPython unless the figure window is killed. If you do an additional plt.show() without a figure is up then you get a complete lock-up of the shell. I[1]: import matplotlib.pyplot as plt I[2]: %gui qt I[3]: plt.plot(range(10)) O[3]: [<matplotlib.lines.Line2D object at 0xab2686c>] I[4]: plt.show() ### The following cannot resolve that issue I[5]: %gui #disable event loops I[6]: %gui -a qt O[6]: <PyQt4.QtGui.QApplication object at 0xaa477ac> I[7]: plt.plot(range(10)) O[7]: [<matplotlib.lines.Line2D object at 0xaf237ac>] I[8]: plt.show() ### In a new IPython, these lines work --no locking after plt.show() "-a" makes the difference. I[1]: import matplotlib.pyplot as plt I[2]: %gui -a qt O[2]: <PyQt4.QtGui.QApplication object at 0x8fdceac> I[3]: plt.plot(range(10)) O[3]: [<matplotlib.lines.Line2D object at 0x9a2c84c>] I[4]: plt.show() ================================================================================ Platform : Linux-2.6.29.6-217.2.3.fc11.i686.PAE-i686-with-fedora-11-Leonidas Python : ('CPython', 'tags/r26', '66714') IPython : 0.11.bzr.r1205 NumPy : 1.4.0.dev Matplotlib : 1.0.svn ================================================================================ -- Gökhan |