[IPython-dev] QtConsole signal handling
Tue Jul 17 09:24:12 CDT 2012
On Fri, Jul 13, 2012 at 5:51 PM, Thomas Kluyver <email@example.com> wrote:
> On 13 July 2012 10:45, Tiago Coutinho <firstname.lastname@example.org> wrote:
> > I know how to check for pylab mode:
> > app = IPython.Application.instance()
> > app.pylab == "qt"
> > ... but how do I find out which is the fronted being used?
> Do you need to? If the difference is only with the inline matplotlib
> backend, you can check for that. The terminal can't use the inline
> backend, so if the inline backend is in use, it must be a kernel for
> an advanced frontend (Qt console, notebook, etc.)
As far as I understand you suggest to check for inline like:
app.pylab == "inline"
but nothing prevents the user from doing:
ipython console --pylab='inline'
In this case IPython reports a warning that 'inline' is not available as
backend so it will use 'auto' instead **but** if I check
app.pylab it still contains "inline"
I have also tryed:
matplotlib.backends.backend and it
so how to properly check for the inline backend?
> Also, remember that the user can start pylab mode after the
> application starts via the %pylab magic. I don't know if that's
> relevant in your case or not.
I won't support this for the moment in my extension so if the user changes
pylab mode, my callback ignores events.
Thanks for the advice
Many thanks for you answers
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev