Re: [matplotlib-devel] Patch for Qt4 backend for IPython GUI
Eric, On Fri, Aug 27, 2010 at 12:15 AM, Eric Firing wrote: > On 08/26/2010 05:13 PM, Brian Granger wrote: >> Hi, >> >> We are in the process of getting our new Qt IPython GUI working with >> matplotlib. One problem we have found is that the matplotlib qt4 >> backend always creates a QApplication. This is problematic in >> situations where another part of an application has already created a >> QApplication. The fix is to have matplotlib first see if a >> QApplication already exists and then use that one. The attached patch >> implements this fix. If needed, Fernando can help test this, but I >> think the change is minor enough that it should be good to go. > > I committed it. Thanks! I am going to post another msg soon about our thoughts on a new and consistent way of detecting existing apps and running event loops. > I suspect the most recent changes to ipython may require changes to > show, but they can wait until things settle down a bit. Very likely, we will be in touch. Brian > Eric > >> >> Cheers, >> >> Brian > > -- > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Patch for Qt4 backend for IPython GUI
On Fri, Aug 27, 2010 at 12:15 AM, Eric Firing wrote: > I committed it. > Many thanks Eric, for being so responsive! Some eye candy to give you an idea of what we're getting from this work: http://fperez.org/tmp/multiplot.png http://fperez.org/tmp/multiplot2.png The second is the MPL contours example, pasted straight into the new ipython frontend, and all plots are correctly rendered inline. All this should be ready for adventurous users to begin testing in a few weeks (it's still a bit alpha right now, so really 'hardhat-only'). But we're very happy with how things are progressing, and it's fabulous to have your rapid response rate on the MPL side. Best regards, f -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] Uniform GUI support across matplotlib, ets and ipython
Hi all, As you may know, this summer we have been working on a new two process IPython that has a beautiful Qt frontend GUI and a ZMQ based messaging layer between that GUI and the new IPython kernel. Many thanks to Enthought for funding this effort! We are currently in the process of adding GUI event loop integration to the ipython kernel so users can do interactive plotting like they can with the regular ipython. You may also remember that last summer we implemented a new PyOs_InputHook based GUI integration for the regular ipython. This has not been released yet, but all of this will be released in the upcoming 0.11 release. I am emailing everyone because we see that there is a need for all of us to agree on two things: 1. How to detect if a GUI application object has been created by someone else. 2. How to detect if a GUI event loop is running. Currently there is code in both ETS and matplotlib that fails to handle these things properly in certain cases. With IPython 0.10, this was not a problem because we used to hijack/monkeypatch the GUI eventloops after we started them. In 0.11, we will no longer be doing that. To address these issues, we have created a standalone module that implements the needed logic: http://github.com/ipython/ipython/blob/newkernel/IPython/lib/guisupport.py This module is heavily commented and introduces a new informal protocol that all of use can use to detect if event loops are running. This informal protocol is inspired by how some of this is handled inside ETS. Our idea is that all projects will simply copy this module into their code and ship it. It is lightweight and does not depend on IPython or other top-level imports. As you will see, we have implemented the logic for wx and qt4, we will need help with other toolkits. An important point is that matplotlib and ets WILL NOT WORK with the upcoming release of IPython unless changes are made to their respective codebases. We consider this a draft and are more than willing to modify the design or approach as appropriate. One thing that we have not thought about yet is how to continue to support 0.10 within this model. The good news amidst all of this is that the quality and stability of the GUI support in IPython is orders of magnitude better than that in the 0.10 series. Cheers, Brian PS: If you are curious, here is a bit of background on the issues related to the PyOS_Inputhook stuff: http://mail.scipy.org/pipermail/ipython-dev/2010-July/006330.html -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Patch for Qt4 backend for IPython GUI
On 08/28/2010 09:38 AM, Fernando Perez wrote: > On Fri, Aug 27, 2010 at 12:15 AM, Eric Firing wrote: >> I committed it. >> > > Many thanks Eric, for being so responsive! Fernando, I'm glad to help; ipython is a crucial part of the tool set. > > Some eye candy to give you an idea of what we're getting from this work: > > http://fperez.org/tmp/multiplot.png > http://fperez.org/tmp/multiplot2.png > > The second is the MPL contours example, pasted straight into the new > ipython frontend, and all plots are correctly rendered inline. Impressive--but I don't think I understand why one would want plots rendered inline rather than in separate windows. Eric > > All this should be ready for adventurous users to begin testing in a > few weeks (it's still a bit alpha right now, so really > 'hardhat-only'). But we're very happy with how things are > progressing, and it's fabulous to have your rapid response rate on the > MPL side. > > Best regards, > > f -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Uniform GUI support across matplotlib, ets and ipython
I implemented an event loop in the MacOSX backend and the PyOS_ImportHook event loop in PyGTK, so I've been interested in this topic. If I understand guisupport.py correctly, IPython runs the backend-specific event loop. Have you considered to implement an event loop in IPython and to run that instead of a backend-specific event loop? Then you won't have to iterate the event loop, and you can run multiple GUI backends (PyGTK, PyQT, Tkinter, ...) at the same time. The latter may work with the current guisupport.py, but is fragile, because running one of the backend-specific event loops may inadvertently run code from a different backend. --Michiel. --- On Sat, 8/28/10, Brian Granger wrote: > From: Brian Granger > Subject: [matplotlib-devel] Uniform GUI support across matplotlib, ets and > ipython > To: matplotlib-devel@lists.sourceforge.net, "IPython Development list" > , enthought-...@enthought.com, "Evan Patterson" > > Date: Saturday, August 28, 2010, 3:42 PM > Hi all, > > As you may know, this summer we have been working on > a new two > process IPython that has a beautiful Qt frontend GUI and a > ZMQ based > messaging layer between that GUI and the new IPython > kernel. Many > thanks to Enthought for funding this effort! > > We are currently in the process of adding GUI event loop > integration > to the ipython kernel so users can do interactive plotting > like they > can with the regular ipython. You may also remember > that last summer > we implemented a new PyOs_InputHook based GUI integration > for the > regular ipython. This has not been released yet, but > all of this will > be released in the upcoming 0.11 release. > > I am emailing everyone because we see that there is a need > for all of > us to agree on two things: > > 1. How to detect if a GUI application object has been > created by someone else. > 2. How to detect if a GUI event loop is running. > > Currently there is code in both ETS and matplotlib that > fails to > handle these things properly in certain cases. With > IPython 0.10, > this was not a problem because we used to > hijack/monkeypatch the GUI > eventloops after we started them. In 0.11, we will no > longer be doing > that. To address these issues, we have created a > standalone module > that implements the needed logic: > > http://github.com/ipython/ipython/blob/newkernel/IPython/lib/guisupport.py > > This module is heavily commented and introduces a new > informal > protocol that all of use can use to detect if event > loops are > running. This informal protocol is inspired by how > some of this is > handled inside ETS. Our idea is that all projects > will simply copy > this module into their code and ship it. It is > lightweight and does > not depend on IPython or other top-level imports. As > you will see, we > have implemented the logic for wx and qt4, we will need > help with > other toolkits. An important point is that matplotlib > and ets WILL > NOT WORK with the upcoming release of IPython unless > changes are made > to their respective codebases. We consider this a > draft and are more > than willing to modify the design or approach as > appropriate. One > thing that we have not thought about yet is how to continue > to support > 0.10 within this model. > > The good news amidst all of this is that the quality and > stability of > the GUI support in IPython is orders of magnitude better > than that in > the 0.10 series. > > Cheers, > > Brian > > PS: If you are curious, here is a bit of background > on the issues > related to the PyOS_Inputhook stuff: > > http://mail.scipy.org/pipermail/ipython-dev/2010-July/006330.html > > -- > Sell apps to millions through the Intel(R) Atom(Tm) > Developer Program > Be part of this innovative community and reach millions of > netbook users > worldwide. Take advantage of special opportunities to > increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel