Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
Hi Darren, -Message d'origine- De : Darren Dale [mailto:dsdal...@gmail.com] Envoyé : dimanche 27 février 2011 22:02 À : Pierre Raybaut Cc : matplotlib-devel Objet : Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend On Sun, Feb 27, 2011 at 3:27 PM, Darren Dale dsdal...@gmail.com wrote: Hi Pierre, Are you still maintaining the qt4 plot editor dialog? It doesn't appear to be working properly: setting the marker and linestyle options does not effect the plot (tested on Ubuntu Natty alpha, with the v1.0.x branch on python-2.7 and PyQt4-4.8.3). Sorry, I think this was a mistake on my part... I have a really hard time following the code. ... but I do have a really hard time understanding the code. Well it seems quite self-explanatory to me (especially the 'formlayout' module which is very OO which tends to hide code complexity), hence the lack of comments. But hey, I wrote it so I guess it's easier for me to read it. Anyway, please don't hesitate to ask questions about the part of the code that seems unclear. Also, the dialog makes the qt4 backend unusable with PyQt4's API v2, which does not provide a QString object. This can be addressed with the following change, which I just @@ -56,9 +56,9 @@ from PyQt4.QtGui import (QWidget, QLineEdit, QComboBox, QLabel QPixmap, QTabWidget, QApplication, QStackedWidget, QDateEdit, QDateTimeEdit, QFont, QFontComboBox, QFontDatabase, QGridLayout) -from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QSize, QString, +from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QObject, QSize, pyqtSignature, pyqtProperty) import datetime class ColorButton(QPushButton): @@ -102,7 +102,8 @@ def text_to_qcolor(text): Avoid warning from Qt when an invalid QColor is instantiated color = QColor() -if isinstance(text, QString): +if isinstance(text, QObject): +# actually a QString, which is not provided by the new PyQt4 API: text = str(text) if not isinstance(text, (unicode, str)): return color This seems ok to me. Cheers, Pierre -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Mon, Jan 11, 2010 at 11:09 AM, Pierre Raybaut cont...@pythonxy.comwrote: John, Following to your last commit on added qt4_editor dialog (rev 8064), here is a significant (but simple) improvement adding an Apply button to the option dialog box (very convenient) -- suggested by Gökhan. (attached diff files should patch formlayout.py and figureoptions.py as in rev. 8064) One minor update: After patching these two files, just change the 'options.svg' in figureoptions.py to qt4_editor_options.svg to suppress the icon not found error message. Thanks, Pierre 2010/1/3 John Hunter jdh2...@gmail.com: On Sun, Jan 3, 2010 at 2:41 PM, Gökhan Sever gokhanse...@gmail.com wrote: You seemed like forgetting to check-in the qt4_editor_options.svg, because I get file not found error: I[2]: Cannot open file '.../matplotlib/lib/matplotlib/mpl-data/images/qt4_editor_options.svg', because: No such file or directory Oops, just added. Thanks for the head's up. JDH -- Gökhan -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Mon, Jan 11, 2010 at 11:53 AM, Gökhan Sever gokhanse...@gmail.com wrote: On Mon, Jan 11, 2010 at 11:09 AM, Pierre Raybaut cont...@pythonxy.com wrote: John, Following to your last commit on added qt4_editor dialog (rev 8064), here is a significant (but simple) improvement adding an Apply button to the option dialog box (very convenient) -- suggested by Gökhan. (attached diff files should patch formlayout.py and figureoptions.py as in rev. 8064) One minor update: After patching these two files, just change the 'options.svg' in figureoptions.py to qt4_editor_options.svg to suppress the icon not found error message. Hey Gökhan, if you could just create an svn diff with the original patches applied and your changes it will be easiest for me to apply that way. JDH -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Sun, Jan 3, 2010 at 9:11 AM, Pierre Raybaut cont...@pythonxy.com wrote: 2009/12/1 Darren Dale dsdal...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* Would you please submit an actual patch? I don't know exactly where you intend these changes to be placed. In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) What is the purpose of this change? What if I didn't want such an axes on my canvas? What if I want to layout my own axes([.2,.2,.75,.75]) or add_subplot(311)? I don't think these changes can be accepted in the current form, they don't appear to integrate well with the standard behavior of the library. Darren Ok, I admit that it was very difficult to fix this -- it took me a lot of seconds without knowing very well matplotlib... ;-) [...] Here is a zip file containing all you need (patch for backend_qt4.py, two scripts to be copied in backends/, and one .svg image to be copied to mpl-data/images/) [...] Your patch file is backwards, it would revert your changes if applied to the updated code. It doesn't matter, the patch is so small that the changes can just be cut and pasted. Unfortunately, however, I will not have time to review your contribution closely enough to consider committing it for at least two weeks, maybe more (conference and long hours at work). I'll look into it when I get a chance, if someone else doesn't beat me to it. Darren -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
2010/1/3 John Hunter jdh2...@gmail.com: On Sun, Jan 3, 2010 at 9:28 AM, Darren Dale dsdal...@gmail.com wrote: Your patch file is backwards, it would revert your changes if applied to the updated code. It doesn't matter, the patch is so small that the changes can just be cut and pasted. Unfortunately, however, I will not have time to review your contribution closely enough to consider committing it for at least two weeks, maybe more (conference and long hours at work). I'll look into it when I get a chance, if someone else doesn't beat me to it. Hey Pierre, Darren, I took a stab at this. I put the helper code in a backends.qt4_editor package, and put the toolbar button right after the configure subplots button. Thanks for the patch and the license change Pierre, and sorry it took us so long to incorporate it. Let me know if any of the reorganizations are a problem for you. JDH That is perfect! Thanks very much John. Pierre -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Sun, Jan 3, 2010 at 12:35 PM, John Hunter jdh2...@gmail.com wrote: On Sun, Jan 3, 2010 at 9:28 AM, Darren Dale dsdal...@gmail.com wrote: Your patch file is backwards, it would revert your changes if applied to the updated code. It doesn't matter, the patch is so small that the changes can just be cut and pasted. Unfortunately, however, I will not have time to review your contribution closely enough to consider committing it for at least two weeks, maybe more (conference and long hours at work). I'll look into it when I get a chance, if someone else doesn't beat me to it. Hey Pierre, Darren, I took a stab at this. I put the helper code in a backends.qt4_editor package, and put the toolbar button right after the configure subplots button. Thanks for the patch and the license change Pierre, and sorry it took us so long to incorporate it. Let me know if any of the reorganizations are a problem for you. JDH John, You seemed like forgetting to check-in the qt4_editor_options.svg, because I get file not found error: I[2]: Cannot open file '.../matplotlib/lib/matplotlib/mpl-data/images/qt4_editor_options.svg', because: No such file or directory Besides, thanks for including this improvement in the trunk. It was long time waited :) -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- Gökhan -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Sun, Jan 3, 2010 at 2:41 PM, Gökhan Sever gokhanse...@gmail.com wrote: You seemed like forgetting to check-in the qt4_editor_options.svg, because I get file not found error: I[2]: Cannot open file '.../matplotlib/lib/matplotlib/mpl-data/images/qt4_editor_options.svg', because: No such file or directory Oops, just added. Thanks for the head's up. JDH -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* Would you please submit an actual patch? I don't know exactly where you intend these changes to be placed. In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) What is the purpose of this change? What if I didn't want such an axes on my canvas? What if I want to layout my own axes([.2,.2,.75,.75]) or add_subplot(311)? I don't think these changes can be accepted in the current form, they don't appear to integrate well with the standard behavior of the library. In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Darren -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
No, unfortunately I have not had time to review the patch. It is on my list. On Mon, Nov 9, 2009 at 3:47 PM, Gökhan Sever gokhanse...@gmail.com wrote: Darren, Have you happened to review Pierre's patch for the toolbar improvement? I am interested to see this integrated in mpl soon. Thanks. On Mon, Nov 9, 2009 at 2:43 PM, Pierre Raybaut cont...@pythonxy.com wrote: Hi, I've already sent everything to Darren. I don't have any news but I guess that it will be integrated soon. Pierre 2009/11/9 Gökhan Sever gokhanse...@gmail.com: Hi Pierre, What is the latest status on this improvement? Will you give a patch to the matplotlib? Please let me know. Thanks On Sat, Jun 6, 2009 at 9:49 AM, Pierre Raybaut cont...@pythonxy.com wrote: 2009/4/28 Dave Peterson dpeter...@enthought.com: Darren Dale wrote: On Tue, Apr 28, 2009 at 12:19 PM, Pierre Raybaut cont...@pythonxy.com wrote: 2009/4/28 John Hunter jdh2...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a Here is the last link: http://code.google.com/p/pyqtshell/ toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. I was not aware of this license restriction in matplotlib... I fully understand the motivation, of course, but still: I wrote all this on my free time which means no PyQt4 commercial license, so it can't be anything but GPL. Sorry... I think you have overlooked a subtlety of PyQt4's license. The author of PyQt4 wrote on the enthought-dev mailing list: PyQt is GPL but has exceptions that allow it to be used with BSD code - hence it's Ok for TraitsBackendQt to be BSD. However, the exception imposes additional conditions which, to all intents and purposes, infects the code with the GPL. To be fair to people that should be made clear in any text. It's still a good idea for TraitsBackendQt to use a BSD license because it allows commercial (ie. non-GPL) users to use it without problems. Darren I think it might be worth contacting the PyQt folks (Phil Thompson) about this. I think there might be some differences here because Phil was the author of TraitsBackendQt and thus his efforts didn't quite fall under the develop under a free license, your results needs to be GPL clause Qt/PyQt have in their licensing. -- Dave Hi all, Dave, you are absolutely right. Last week-end, I found myself surfing on PyQt's website and I told to myself: what about re-reading the license? (always a pleasure) And surprisingly, I found out that anyone using the GPL version of PyQt can release source code under a very permissive license (like MIT or BSD) thanks to the PyQt-GPL Exception, as long as PyQt itself is not part of the distributed package (otherwise the whole package has to be licensed under GPL) - and with other little restrictions. It was a surprise because I've read here and there a lot of things on PyQt license and the general idea was if you write PyQt code without the commercial license, your code *must* be licensed under GPL - I can tell now that it's not true (to be absolutely certain about it, I even asked to Phil Thompson to confirm this, and he did). So, I switched all the code I was referring to in my original e-mail to MIT license. I guess now it could be integrated to matplotlib Qt4 backend? formlayout (generate option dialogs):
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
Darren, Have you happened to review Pierre's patch for the toolbar improvement? I am interested to see this integrated in mpl soon. Thanks. On Mon, Nov 9, 2009 at 2:43 PM, Pierre Raybaut cont...@pythonxy.com wrote: Hi, I've already sent everything to Darren. I don't have any news but I guess that it will be integrated soon. Pierre 2009/11/9 Gökhan Sever gokhanse...@gmail.com: Hi Pierre, What is the latest status on this improvement? Will you give a patch to the matplotlib? Please let me know. Thanks On Sat, Jun 6, 2009 at 9:49 AM, Pierre Raybaut cont...@pythonxy.com wrote: 2009/4/28 Dave Peterson dpeter...@enthought.com: Darren Dale wrote: On Tue, Apr 28, 2009 at 12:19 PM, Pierre Raybaut cont...@pythonxy.com wrote: 2009/4/28 John Hunter jdh2...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a Here is the last link: http://code.google.com/p/pyqtshell/ toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. I was not aware of this license restriction in matplotlib... I fully understand the motivation, of course, but still: I wrote all this on my free time which means no PyQt4 commercial license, so it can't be anything but GPL. Sorry... I think you have overlooked a subtlety of PyQt4's license. The author of PyQt4 wrote on the enthought-dev mailing list: PyQt is GPL but has exceptions that allow it to be used with BSD code - hence it's Ok for TraitsBackendQt to be BSD. However, the exception imposes additional conditions which, to all intents and purposes, infects the code with the GPL. To be fair to people that should be made clear in any text. It's still a good idea for TraitsBackendQt to use a BSD license because it allows commercial (ie. non-GPL) users to use it without problems. Darren I think it might be worth contacting the PyQt folks (Phil Thompson) about this. I think there might be some differences here because Phil was the author of TraitsBackendQt and thus his efforts didn't quite fall under the develop under a free license, your results needs to be GPL clause Qt/PyQt have in their licensing. -- Dave Hi all, Dave, you are absolutely right. Last week-end, I found myself surfing on PyQt's website and I told to myself: what about re-reading the license? (always a pleasure) And surprisingly, I found out that anyone using the GPL version of PyQt can release source code under a very permissive license (like MIT or BSD) thanks to the PyQt-GPL Exception, as long as PyQt itself is not part of the distributed package (otherwise the whole package has to be licensed under GPL) - and with other little restrictions. It was a surprise because I've read here and there a lot of things on PyQt license and the general idea was if you write PyQt code without the commercial license, your code *must* be licensed under GPL - I can tell now that it's not true (to be absolutely certain about it, I even asked to Phil Thompson to confirm this, and he did). So, I switched all the code I was referring to in my original e-mail to MIT license. I guess now it could be integrated to matplotlib Qt4 backend? formlayout (generate option dialogs): http://code.google.com/p/formlayout/ pydee (IDE which integrates matplotlib and the option dialog): http://code.google.com/p/pydee/ Meanwhile, thanks to the brand new
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
Hi Pierre, On Sat, Jun 6, 2009 at 11:49 AM, Pierre Raybaut cont...@pythonxy.comwrote: 2009/4/28 Dave Peterson dpeter...@enthought.com: Darren Dale wrote: On Tue, Apr 28, 2009 at 12:19 PM, Pierre Raybaut cont...@pythonxy.com wrote: 2009/4/28 John Hunter jdh2...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a Here is the last link: http://code.google.com/p/pyqtshell/ toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. I was not aware of this license restriction in matplotlib... I fully understand the motivation, of course, but still: I wrote all this on my free time which means no PyQt4 commercial license, so it can't be anything but GPL. Sorry... I think you have overlooked a subtlety of PyQt4's license. The author of PyQt4 wrote on the enthought-dev mailing list: PyQt is GPL but has exceptions that allow it to be used with BSD code - hence it's Ok for TraitsBackendQt to be BSD. However, the exception imposes additional conditions which, to all intents and purposes, infects the code with the GPL. To be fair to people that should be made clear in any text. It's still a good idea for TraitsBackendQt to use a BSD license because it allows commercial (ie. non-GPL) users to use it without problems. Darren I think it might be worth contacting the PyQt folks (Phil Thompson) about this. I think there might be some differences here because Phil was the author of TraitsBackendQt and thus his efforts didn't quite fall under the develop under a free license, your results needs to be GPL clause Qt/PyQt have in their licensing. -- Dave Hi all, Dave, you are absolutely right. Last week-end, I found myself surfing on PyQt's website and I told to myself: what about re-reading the license? (always a pleasure) And surprisingly, I found out that anyone using the GPL version of PyQt can release source code under a very permissive license (like MIT or BSD) thanks to the PyQt-GPL Exception, as long as PyQt itself is not part of the distributed package (otherwise the whole package has to be licensed under GPL) - and with other little restrictions. It was a surprise because I've read here and there a lot of things on PyQt license and the general idea was if you write PyQt code without the commercial license, your code *must* be licensed under GPL - I can tell now that it's not true (to be absolutely certain about it, I even asked to Phil Thompson to confirm this, and he did). So, I switched all the code I was referring to in my original e-mail to MIT license. I guess now it could be integrated to matplotlib Qt4 backend? formlayout (generate option dialogs): http://code.google.com/p/formlayout/ pydee (IDE which integrates matplotlib and the option dialog): http://code.google.com/p/pydee/ Meanwhile, thanks to the brand new Google-code Mercurial support, you may browse the source code if you like: http://code.google.com/p/pydee/source/browse/pydeelib/widgets/figureoptions.py Do you have the customize image in svg, and do you have the right to release it under the terms of the matplotlib license? Would you be willing to provide feedback in the future if problems are reported? Darren
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
Hi, formlayout will definitely a very nice addition to matplotlib Qt4 backended plotting windows. It reminds me Traits UI's configure.traits() method. PyQt4 programming is still a mystery to me, and have chosen to learn Traits instead. I am also curious to know what happened to pydee - IPython integration plans? I should also mention, I have started a weekly Python meeting in our department. I highly recommended to Windows users to start with Python(X,Y). I will see the results next week :) Gökhan Hi all, Dave, you are absolutely right. Last week-end, I found myself surfing on PyQt's website and I told to myself: what about re-reading the license? (always a pleasure) And surprisingly, I found out that anyone using the GPL version of PyQt can release source code under a very permissive license (like MIT or BSD) thanks to the PyQt-GPL Exception, as long as PyQt itself is not part of the distributed package (otherwise the whole package has to be licensed under GPL) - and with other little restrictions. It was a surprise because I've read here and there a lot of things on PyQt license and the general idea was if you write PyQt code without the commercial license, your code *must* be licensed under GPL - I can tell now that it's not true (to be absolutely certain about it, I even asked to Phil Thompson to confirm this, and he did). So, I switched all the code I was referring to in my original e-mail to MIT license. I guess now it could be integrated to matplotlib Qt4 backend? formlayout (generate option dialogs): http://code.google.com/p/formlayout/ pydee (IDE which integrates matplotlib and the option dialog): http://code.google.com/p/pydee/ Meanwhile, thanks to the brand new Google-code Mercurial support, you may browse the source code if you like: http://code.google.com/p/pydee/source/browse/pydeelib/widgets/figureoptions.py Cheers, Pierre -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
Gökhan SEVER a écrit : Hi, formlayout will definitely a very nice addition to matplotlib Qt4 backended plotting windows. It reminds me Traits UI's configure.traits() method. PyQt4 programming is still a mystery to me, and have chosen to learn Traits instead. I am also curious to know what happened to pydee - IPython integration plans? I changed its priority but the IPython integration in pydee is still planned for this summer. To be honest, I didn't have the time to work on this for a long time now (actually since the IPython PyQt4 frontend demo I've coded in April). In the meantime, I concentrated on cleaning the code, fixing a lot of bugs, improving performances (Workspace mainly) and adding new features: console in a separate process (the external console: running scripts, debugging, interacting, opening a Python interpreter... with code-completion, calltips, ...), files/directories explorer, class browser, fast code analysis (pyflakes), find in files (next release)... I should also mention, I have started a weekly Python meeting in our department. I highly recommended to Windows users to start with Python(X,Y). Of course, I agree that is certainly the best thing to do ;-) Pierre I will see the results next week :) Gökhan Hi all, Dave, you are absolutely right. Last week-end, I found myself surfing on PyQt's website and I told to myself: what about re-reading the license? (always a pleasure) And surprisingly, I found out that anyone using the GPL version of PyQt can release source code under a very permissive license (like MIT or BSD) thanks to the PyQt-GPL Exception, as long as PyQt itself is not part of the distributed package (otherwise the whole package has to be licensed under GPL) - and with other little restrictions. It was a surprise because I've read here and there a lot of things on PyQt license and the general idea was if you write PyQt code without the commercial license, your code *must* be licensed under GPL - I can tell now that it's not true (to be absolutely certain about it, I even asked to Phil Thompson to confirm this, and he did). So, I switched all the code I was referring to in my original e-mail to MIT license. I guess now it could be integrated to matplotlib Qt4 backend? formlayout (generate option dialogs): http://code.google.com/p/formlayout/ pydee (IDE which integrates matplotlib and the option dialog): http://code.google.com/p/pydee/ Meanwhile, thanks to the brand new Google-code Mercurial support, you may browse the source code if you like: http://code.google.com/p/pydee/source/browse/pydeelib/widgets/figureoptions.py Cheers, Pierre -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.comwrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible ( http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. JDH -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
2009/4/28 John Hunter jdh2...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a Here is the last link: http://code.google.com/p/pyqtshell/ toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. I was not aware of this license restriction in matplotlib... I fully understand the motivation, of course, but still: I wrote all this on my free time which means no PyQt4 commercial license, so it can't be anything but GPL. Sorry... Pierre JDH -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
On Tue, Apr 28, 2009 at 12:19 PM, Pierre Raybaut cont...@pythonxy.comwrote: 2009/4/28 John Hunter jdh2...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a Here is the last link: http://code.google.com/p/pyqtshell/ toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. I was not aware of this license restriction in matplotlib... I fully understand the motivation, of course, but still: I wrote all this on my free time which means no PyQt4 commercial license, so it can't be anything but GPL. Sorry... I think you have overlooked a subtlety of PyQt4's license. The author of PyQt4 wrote on the enthought-dev mailing list: PyQt is GPL but has exceptions that allow it to be used with BSD code - hence it's Ok for TraitsBackendQt to be BSD. However, the exception imposes additional conditions which, to all intents and purposes, infects the code with the GPL. To be fair to people that should be made clear in any text. It's still a good idea for TraitsBackendQt to use a BSD license because it allows commercial (ie. non-GPL) users to use it without problems. Darren -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend
Darren Dale wrote: On Tue, Apr 28, 2009 at 12:19 PM, Pierre Raybaut cont...@pythonxy.com mailto:cont...@pythonxy.com wrote: 2009/4/28 John Hunter jdh2...@gmail.com mailto:jdh2...@gmail.com: On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com mailto:cont...@pythonxy.com wrote: Hi all, I would like to contribute to matplotlib with this enhancement for the PyQt4 backend: the idea is to add a toolbar button to configure figure options (axes, curves, ...). It's based on a tiny module called formlayout to generate PyQt4 form dialog automatically. Some screenshots: http://code.google.com/p/formlayout/ So, if you're interested (all the following is GPL2): *matplotlib patch* In FigureManagerQT.__init__, added: self.canvas.axes = self.canvas.figure.add_subplot(111) In NavigationToolbar2QT._init_toolbar, added: a = self.addAction(self._icon(customize.png), 'Customize', self.edit_parameters) a.setToolTip('Edit curves line and axes parameters') Added the following method in NavigationToolbar2QT: def edit_parameters(self): from figureoptions import figure_edit figure_edit(self.canvas, self) *additionnal modules and data* formlayout.py (http://code.google.com/p/formlayout/) figureoptions.py (http://code.google.com/p/PyQtShell/) customize.png (http://code.google.com/p/PyQtShell/) Hi Pierre -- this looks very nice (the last link is broken though , I get a 404 error). We would be happy to include this in matplotlib or as a Here is the last link: http://code.google.com/p/pyqtshell/ toolkit. To contribute it to to mpl, the license needs to be matplotlib compatible (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) but we have more licensing flexibility in a toolkit, though we prefer to keep everything BSD compatible where possible. And of course you would need to agree to maintain it :-) but I think many users would appreciate a GUI plot configuration dialog. I was not aware of this license restriction in matplotlib... I fully understand the motivation, of course, but still: I wrote all this on my free time which means no PyQt4 commercial license, so it can't be anything but GPL. Sorry... I think you have overlooked a subtlety of PyQt4's license. The author of PyQt4 wrote on the enthought-dev mailing list: PyQt is GPL but has exceptions that allow it to be used with BSD code - hence it's Ok for TraitsBackendQt to be BSD. However, the exception imposes additional conditions which, to all intents and purposes, infects the code with the GPL. To be fair to people that should be made clear in any text. It's still a good idea for TraitsBackendQt to use a BSD license because it allows commercial (ie. non-GPL) users to use it without problems. Darren I think it might be worth contacting the PyQt folks (Phil Thompson) about this. I think there might be some differences here because Phil was the author of TraitsBackendQt and thus his efforts didn't quite fall under the develop under a free license, your results needs to be GPL clause Qt/PyQt have in their licensing. -- Dave -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel