[IPython-dev] Qt api selection re. ipython and matplotlib

MinRK benjaminrk at gmail.com
Wed Jul 6 11:34:53 EDT 2011


I updated my IPython PR with my understanding of the recent discussion.

Now, QT_API will be asked *first*, and if QT_API=pyqt, IPython will
set the v2 APIs.

QT_API=pyqt : use pyqt with v2
QT_API=pyside : use pyside
QT_API unset : ask matplotlib for pyqt4 or pyside, will not set v2 APIs

The default, and most likely case remains PyQt4 without updating sip
apis, falling back on PySide.

-MinRK

On Wed, Jul 6, 2011 at 08:23, Evan Patterson <epatters at enthought.com> wrote:
> [snip]
>
>> Darren et al.,
>>
>> Is all this good from your mpl/qt standpoint?  We could make mpl pay
>> attention to the ETS QT_API environment variable, if present, while
>> retaining the rcParam.  For example, QT_API could simply override the
>> rcParam, with the additional effect of forcing v2 in the PyQt4 case.  In
>> other words, if QT_API is defined, we would follow the original ETS
>> strategy; otherwise the rcParams strategy as in my last mpl pull
>> request.  I think that although this is a bit more complicated, and
>> would require one more iteration on the ipython side as well as on the
>> mpl side, it might last longer as a way to handle just about all
>> situations, including mpl mixed with ETS things.
>>
>> Regarding PySide: I actually can't get it to work in interactive mode
>> (that is, display a plot) even from the straight python prompt; it is
>> working in interactive mode at present only in the ipython qtconsole.
>> As of April, PySide apparently did not use the input hook:
>>
>> http://lists.pyside.org/pipermail/pyside/2011-April/002362.html
>>
>> Google didn't turn up anything more recent.  So how is it that pylab
>> with PySide is working in qtconsole?
>>
>> Eric
>
> PySide works in the qtconsole because the ZMQ kernel actually starts the event loop, unlike the single process IPython shell. (It can do this, of course, because it does not need to prompt the user for any input.)
>
> Evan
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



More information about the IPython-dev mailing list