[PYDBUS]Export method question

Robert McQueen robert.mcqueen at collabora.co.uk
Mon Oct 31 05:40:38 PST 2005

Claudio Takahasi wrote:
> Hi Robert,
> Is there a way to get the message header attributes?

No, the Python bindings are designed to hide the bus messages from you
as much as they can, for better or worse...

> If I get the message header attributes and create a reply message
> after it solve my problem :)

That's not going to happen, you're not meant to handle messages
directly. The patch I'm working on (should be done in a day or two) will
allow this kind of thing to do an asynchronous method implementation:

@dbus.service.method(interface, async=True)
def AsyncMethod(args, reply_callback=None, error_callback=None):
    ... do some long-running processing ...

    ... queue some stuff ...

    ... then in another galaxy, far far away ...
    reply_callback(return, values)
    ... or if it all goes wrong ...
    handle Exception, e:

> Regards,
> Claudio.


More information about the dbus mailing list