GNOME Bugzilla – Bug 542470
Add a python console plugin
Last modified: 2008-07-30 09:39:29 UTC
I really like to play around with the totem python plugin system and a python console plugin would be nice to test smalls ideas. I "stole" the code from gedit a "port it" to totem. I change the copyright, but be free to change it again. Credits go to Steve Frécinaux, who wrote the gedit plugin.
Created attachment 114357 [details] Totem python console plugin
The license isn't compatible with Totem's though. Totem is GPL+exception, gedit is GPL. You'll need to do the leg work to get the code relicensed. I'd also like to see a patch being posted rather than a tarball (for which the wrong mime-type was used).
Bastien, sorry about the mime-type, and not properly upload a diff. All this is because about my own ignorance. I will try to contact someone from gedit project, how (if possible) relicense the code. Could you give me some advice on this?
It is fine for me to allow totem use the gedit python console. Anyway, I don't understand all the changes in the copyright headers. In the case of the gedit's console.py, I did take a few bits from previous implementations, but most of the code has been fully rewritten. Thus I made a mention to bits and parts I took somewhere else. Regarding yours, apart from merging console.py and the plugin file (which I wouldn't do since the console is meant to be independant from the "host" and is to be cut'n'pasted easily) I don't see *majors* changes that would justify the original code to be qualified as "bits"... Apart from that very detail, I'm fine with it.
Created attachment 114681 [details] [review] Python Console plugin diff file from trunk There is a missing part on this. I find no way to install console.py when you run make install. Any comment on this will be appreciate.
Comment on attachment 114681 [details] [review] Python Console plugin diff file from trunk <snip> >Index: src/plugins/pythonconsole/pythonconsole.totem-plugin >=================================================================== >--- src/plugins/pythonconsole/pythonconsole.totem-plugin (revision 0) >+++ src/plugins/pythonconsole/pythonconsole.totem-plugin (revision 0) This needs to be a totem-plugin.in file, the .totem-plugin files are generated during build. <snip> >+Description=Interactive python console standing in the sidebar. Wouldn't it be better for testing as a separate window? Otherwise it makes testing sidebar related code pretty hard... >+Authors=Andrés de Barbará >+Copyright=Copyright © 2008 Andrés de Barbará Maybe mentioning Steve there would be good?
Created attachment 114921 [details] [review] Python Console plugin diff file from trunk Add support for debugging via rpdb2. Change copyright to Steve. Add the missing pythonconsole.totem-plugin.in to the patch. Add pythonconsole.py and pythonconsole.totem-plugin.in to POTFILES.in. Modify the Makefile.am to include console.py in the installation. Don't use the sidebar to display the console. A new window is created with the console inside.
2008-07-30 Bastien Nocera <hadess@hadess.net> * configure.in: * src/plugins/pythonconsole/Makefile.am: * src/plugins/pythonconsole/console.py: * src/plugins/pythonconsole/pythonconsole.py: * src/plugins/pythonconsole/pythonconsole.totem-plugin.in: * totem.spec.in: Patch from Andrés de Barbará <adebarbara@gmail.com> to add a Python console to Totem (Closes: #542470)