In parallel to a push for adding more high-level APIs to telepathy-glib, we are looking at what remains to be done in the gobject-introspection stack so we don't need to write static bindings for each language. After some weeks hacking on Gjs (Danielle Madeley), Vala (Travis Reitter) and PyGI (me) things are starting to take shape.
Following Danni's post on her progress, here comes an example observer written in Python and using PyGI to call telepathy-glib:
from gi.repository import TelepathyGLib
def observe_channels(observer, account, connection, channels,
dispatch_op, requests, context, user_data):
print 'account = %s' % account.get_object_path()
print 'connection = %s' % connection.get_object_path()
for channel in channels:
print 'channel = %s' % channel.get_object_path()
if dispatch_op is not None:
print 'dispatch_op = %s' % dispatch_op.get_object_path()
print 'dispatch_op = None'
if requests is not None:
for request in requests:
print 'request = %s' % request.get_object_path()
dbus = TelepathyGLib.DBusDaemon.dup()
observer = TelepathyGLib.SimpleObserver.new(dbus, True, 'PythonObserver', True,
main_loop = gobject.MainLoop()
This needs the latest code in telepathy-glib, gobject-introspection and pygi, and also a patch to PyGI that hasn't been release yet.
hi, I'm doing a gtk application and I would like start porting it to python 3, can I use pygi to use gtk in python 3?
how is the status of the port?
cay you point me to some link that helps me get started?
Hi, the state of the port is such that we have patches for PyGObject and PyGI that passes the tests with Python 3, see for links:
We will appreciate help pushing this forward!
Post a Comment