[gedit-list] pythonconsole for GEdit-3



Hi,

I'm trying to get the pythonconsole running for Gedit-3/master and stumbled on the following problems.

Just doing nothing special at all, I get

(gedit:21970): libpeas-WARNING **: Error initializing Python interpreter: could not import gi

I can fix that error by adding this to my ~/.jhbuildrc

addpath('PYTHONPATH', '/opt/gnome/lib/python2.6/site-packages/gtk-2.0')

Is this required / is the gtk-2.0 supposed to be there?

Having done that I get an 'Could not find any typelib for Gedit' error from __init__.py:

from gi.repository import GObject, Gtk, Gedit, Peas, PeasUI

I see 'gedit-plugins-engine.c:143 (require_private_typelib) Namespace 'Gedit' loaded.' before that.

I can work around this by copying the gir&typelib to /opt/gnome (cp gedit/gedit/Gedit-3.0.typelib /opt/gnome/lib/girepository-1.0; cp gedit/gedit/Gedit-3.0.gir /opt/gnome/share/gir-1.0/), but was told this should not be necessary...

After copying my way around it fails because of:

File "/opt/gnome/lib/python2.6/site-packages/gtk-2.0/gi/overrides/Gtk.py", line 331, in insert
    Gtk.TextBuffer.insert(self, iter, text, length)
File "/opt/gnome/lib/python2.6/site-packages/gtk-2.0/gi/types.py", line 40, in function
    return info.invoke(*args)
TypeError: insert() takes exactly 3 argument(s) (4 given)

Seems like the type signature doesn't match here and I guess the gtk-2.0 might be at fault here?

It would be great to have a pythonconsole running, I'm really looking forward to doing a bit of plugin hacking in Python, but I'm just learning all the Gnome/Gtk environment so I could not get it working by myself. Thanks in advance for hints how to get this running!

Greetings,

Ralf



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]