Python bindings

John (J5) Palmieri johnp at
Thu Dec 23 09:05:13 PST 2004

On Thu, 2004-12-23 at 08:58 +0100, Julien PUYDT wrote:
> Hi,
> I have two questions about the python bindings:
> 1) how do I activate a service? 

I just checked and the python bindings don't seem to wrap the activation
methods.  There are two ways, you can set the auto activation flag on
the message bus (dbus_message_set_auto_activation) and just call a
method of the service or you can call dbus_bus_activate_service and
activate the service directly.  Both of those need to be wrapped.  If I
can get to it over vacation I will. 

> I tried to call the ActivateService
> method on /org/freedesktop/DBus, but got an error message because I
> should have provided a second argument of type uint32 (which I don't
> know how to obtain) ;

Not sure how to do it through the dbus interface.  Check how
dbus_bus_activate_service does it and you might be able to do activation
from pure dbus calls without needing the python wrappers.

> 2) how do I send a message without waiting for a reply?

You would need to use the lowlevel dbus bindings (import dbus_bindings)
and call send_with_reply or just send on a dbus_bindings.Connection
object (note that send_with_reply_and_block is the function that is used
to send a message and wait for a reply.  send_with_reply returns a
PendingCall object which can be used to get a reply async.  Check the file for more info assuming you are willing to wade
through Pyrex code which is a mixture of Python and C).

> I'm a python beginner, so perhaps I missed something obvious...
> Snark on #gnomemeeting
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.

More information about the dbus mailing list