Looking forward, supporting the Python 3 compatible PyQt API is likely the way to go.

Le , Gerald Storer <g...@mrxtech.com.au> 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.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and publish 
your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to