[Eric] matplotlib and eric4
dd55 at cornell.edu
Sat Sep 8 14:46:42 BST 2007
On Saturday 08 September 2007 4:24:10 am Detlev Offenbach wrote:
> On Freitag, 7. September 2007, killian koepsell wrote:
> > hi,
> > i installed eric4 on osx and i have the following problem:
> > i want to debug a multi-threaded python application. more concretely, i
> > have an application that opens a graphical window (using matplotlib
> > http://matplotlib.sourceforge.net/). it seems to be impossible to
> > interact with the debugger as long as the graphical window is open.
> > however, i am used to interact with the python interpreter while
> > (several) graphical windows are open. this is for example possible inside
> > ipython (
> > http://ipython.scipy.org/). is there a way to do the same inside eric?
> > thanks,
> > kilian
> Does matplotlib have it's own kind of event loop or something like this?
> From what you describe, it seems, that the matplotlib code is not returning
> to Python.
Yes, matplotlib does start its own event loop when using one of the gui
backends, like Qt/Qt4, gtk, Wx, Tk (as well as the gui backends that use Agg
for rendering)... The event loop is started by a call to show(). It is
possible to work with plots interactively (no call to show is needed, the
window is opened and updated each time the plot is updated), this feature is
best supported in IPython, which starts the qApp in a separate thread for all
of the backends I listed earlier.
More information about the Eric