After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 542470 - Add a python console plugin
Add a python console plugin
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
2.22.x
Other All
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-07-11 00:19 UTC by adebarbara
Modified: 2008-07-30 09:39 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Totem python console plugin (4.35 KB, text/plain)
2008-07-11 00:24 UTC, adebarbara
  Details
Python Console plugin diff file from trunk (15.93 KB, patch)
2008-07-16 20:03 UTC, adebarbara
needs-work Details | Review
Python Console plugin diff file from trunk (18.09 KB, patch)
2008-07-21 14:06 UTC, adebarbara
committed Details | Review

Description adebarbara 2008-07-11 00:19:17 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.
Comment 1 adebarbara 2008-07-11 00:24:44 UTC
Created attachment 114357 [details]
Totem python console plugin
Comment 2 Bastien Nocera 2008-07-14 15:06:41 UTC
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).
Comment 3 adebarbara 2008-07-16 02:14:56 UTC
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?
Comment 4 Steve Frécinaux 2008-07-16 13:17:27 UTC
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.
Comment 5 adebarbara 2008-07-16 20:03:36 UTC
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 6 Bastien Nocera 2008-07-21 10:14:59 UTC
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?
Comment 7 adebarbara 2008-07-21 14:06:06 UTC
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.
Comment 8 Bastien Nocera 2008-07-30 09:39:29 UTC
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)