[Telepathy] Accessing Folks from python

Frederik Elwert frederik.elwert at web.de
Fri Dec 2 01:21:11 PST 2011


with a few other guys, I am currently planning a contacts management
application, and we would love to use Folks for this. I know that
currently vala and GObject/C are the main targets for Folks, and GNOME
Contacts is written in Vala.

Now since we would prefer using python for our application, I was
wondering if it is possible to access Folks from python. I could manage
to import it from gi.repository, but it then fails during

        from gi.repository import Folks
        agg = Folks.IndividualAggregator()
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43,
        in function
            return info.invoke(*args, **kwargs)
        TypeError: prepare() takes exactly 3 arguments (1 given)

I have seen that the generated c code has this function signature:

        void folks_individual_aggregator_prepare
        (FolksIndividualAggregator* self, GAsyncReadyCallback
        _callback_, gpointer _user_data_);

So I guess this is why it expects three arguments. But this seems not to
match the public API that vala uses.

So is it possible to use Folks from python and I am just doing something
wrong? Or do we have to switch to vala?

Best Regards

More information about the telepathy mailing list