Re: [matplotlib-devel] Backend for Pyside
Hello, This is not directly related to your patch but I would like to report here that I still have at least one issue on MacOs that prevent matplotlib to work with your pyside backend. Indeed current PySide version (1.0.2) have a bug on MacOS that seems to have been fixed recently: http://bugs.pyside.org/show_bug.cgi?id=809 But I will have to wait for next PySide release to confirm your pyside patch works on MacOs. Will test as soon as next pyside version is out and available on macports. I do not have time nor will to test with the latest current pyside head. Regards, David Le 06/05/11 03:36, Gerald Storer a écrit : > Hi, > I was wondering if I could get a comment on this. Its been 4 weeks > since I submitted the original version and it has been more or less > production ready since Monday. > > https://github.com/matplotlib/matplotlib/pull/80 > > Thanks, > Gerald. > > On 11/04/2011 4:49 PM, Gerald Storer wrote: >> Hi, >> I've submitted a pull request with backend changes that (should) let >> all currently supported versions of PyQt work along side PySide. I've >> tested with PyQt 4.8.3 and PySide 1.0.0. >> >> I haven't bothered chasing down old versions of PyQt as they seem >> elusive. >> >> Gerald. >> >> On 29/03/2011 3:25 AM, butt...@gmail.com wrote: >>> Looking forward, supporting the Python 3 compatible PyQt API is >>> likely the way to go. >>> >>> Le , Gerald Storer a écrit : On 28/03/2011 1:10 AM, Peter Butterworth wrote: Wouldn't it be possible to use a single backend compatible with both PyQt and Pyside ? The current Qt mpl backend uses the old PyQt slots/signals API >>> which PySide doesn't really support (there are some macros but they >>> don't work 100% the same). From a quick glance at the IPython >>> implementation it looks like they are using the new API which means >>> older versions (<4.5) of PyQt won't be supported. This might be ok, I >>> don't know. If it isn't then, there will need to be some try...excepts around >>> the place or separate back ends. If you ignore the PySide bugs I had >>> to work around I've only changed ~4 lines in the main backend. Pierre's formlayout is also using an obsolete method that isn't >>> present in PySide. I've opted to emulate it, but it would be best to >>> change the code to use the alternative method available in both PyQt >>> and PySide. formlayout also uses the old QString implementation of >>> PyQt, PySide only supports the new implementation where QString is >>> transparently convert to/from str/unicode. Setting QString = unicode >>> seems to work though. Gerald. > > > > -- > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Backend for Pyside
I've added some comments and tested against PyQt4 4.7.3 -- I don't have PySide installed, so I'll just assume it works there, too. Cheers, Mike On 05/05/2011 09:36 PM, Gerald Storer wrote: > Hi, > I was wondering if I could get a comment on this. Its been 4 weeks > since I submitted the original version and it has been more or less > production ready since Monday. > > https://github.com/matplotlib/matplotlib/pull/80 > > Thanks, > Gerald. > > On 11/04/2011 4:49 PM, Gerald Storer wrote: > >> Hi, >> I've submitted a pull request with backend changes that (should) let >> all currently supported versions of PyQt work along side PySide. I've >> tested with PyQt 4.8.3 and PySide 1.0.0. >> >> I haven't bothered chasing down old versions of PyQt as they seem >> elusive. >> >> Gerald. >> >> On 29/03/2011 3:25 AM, butt...@gmail.com wrote: >> >>> Looking forward, supporting the Python 3 compatible PyQt API is >>> likely the way to go. >>> >>> Le , Gerald Storer a écrit : >>> On 28/03/2011 1:10 AM, Peter Butterworth wrote: Wouldn't it be possible to use a single backend compatible with both PyQt and Pyside ? The current Qt mpl backend uses the old PyQt slots/signals API >>> which PySide doesn't really support (there are some macros but they >>> don't work 100% the same). From a quick glance at the IPython >>> implementation it looks like they are using the new API which means >>> older versions (<4.5) of PyQt won't be supported. This might be ok, I >>> don't know. >>> If it isn't then, there will need to be some try...excepts around >>> the place or separate back ends. If you ignore the PySide bugs I had >>> to work around I've only changed ~4 lines in the main backend. >>> Pierre's formlayout is also using an obsolete method that isn't >>> present in PySide. I've opted to emulate it, but it would be best to >>> change the code to use the alternative method available in both PyQt >>> and PySide. formlayout also uses the old QString implementation of >>> PyQt, PySide only supports the new implementation where QString is >>> transparently convert to/from str/unicode. Setting QString = unicode >>> seems to work though. >>> Gerald. > > > -- > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] figure error during python shutdown
I think this might have existed for a long time, but there just hasn't been much testing running Gtk without opening windows. There is a fix in this pull request. https://github.com/matplotlib/matplotlib/pull/106 Can you confirm it works for you? Mike On 05/05/2011 05:17 PM, Benjamin Root wrote: There seems to be an odd error that comes up when exiting python after using matplotlib with gtkagg backend. I only notice this error if I do not display the figure (i.e., only saving figures in a headless mode) and during the test. Also, this is with matplotlib master branch. I have not tested this with any other branch. Here is the error message: Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/bvr/Programs/matplotlib/lib/matplotlib/_pylab_helpers.py", line 82, in destroy_all manager.destroy() File "/home/bvr/Programs/matplotlib/lib/matplotlib/backends/backend_gtk.py", line 552, in destroy self.canvas.destroy() AttributeError: FigureManagerGTKAgg instance has no attribute 'canvas' Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/bvr/Programs/matplotlib/lib/matplotlib/_pylab_helpers.py", line 82, in destroy_all manager.destroy() File "/home/bvr/Programs/matplotlib/lib/matplotlib/backends/backend_gtk.py", line 552, in destroy self.canvas.destroy() AttributeError: FigureManagerGTKAgg instance has no attribute 'canvas' This happens with both python 2.6 and 2.7. I have not tested any other version. Ben Root -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel