PyGI, Folks and Gee



Hello,

I am currently trying to write a Python application that accesses
contacts data via Folks. As it turns out, nobody seems to have written a
Folks application in Python before. I got some help from the telepathy
guys, but there seem to be issues deep in the libfolks/libgee/GI/Python
stack that go far beyond my knowledge and skills.

So I was now advised to ask for help here, as this might require a PyGI
wizard to deal with. The basic issue is a segfault with this sample
script:

----8<----
from gi.repository import GObject
from gi.repository import Folks


def list_individuals():
    iterator = aggregator.props.individuals.props.keys.iterator()
    while iterator.next():
        key = iterator.get()
        print aggregator.props.individuals.get(key)

aggregator = Folks.IndividualAggregator.new()
aggregator.prepare(None, None)

GObject.timeout_add(2000, list_individuals)

main_loop = GObject.MainLoop()
main_loop.run()
---->8----

There was an initial analysis of the issue on the libgee mailing list:

http://mail.gnome.org/archives/libgee-list/2012-January/msg00007.html

The discussion on the telepathy list (including some gdb traces) can be
found here:
http://lists.freedesktop.org/archives/telepathy/2012-January/005951.html

So if anyone has a clue if it is possible to make Python, Folks and Gee
play together nicely, I would be very happy.

Regards
Frederik



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