What kind of signature for this special method?
Luigi Paioro
luigi at lambrate.inaf.it
Fri Oct 13 01:32:45 PDT 2006
Hi!
I would like to export a special method of a Python object which is
something like this:
class Hello(dbus.service.Object):
def __init__(self, bus_name, object_path = '/my/example/Hello'):
dbus.service.Object.__init__(self, bus_name, object_path)
@dbus.service.method("my.example.Hello")
def mySpecialMethod(self, **args):
# something here with args dictionary
I need to add an in_signature argument to the method decoration in order
to have a good introspection. Does it exist a way to have such a
flexible signature? Any idea? I'm afraid it's impossible...
Ah, another question...
I was trying to have the object attributes accessible via a D-Bus proxy
(we already had a discussion on this topic) exporting __getattr__ and
__setattr__ as normal service methods, but it doesn't work (maybe for
you it is obvious but for me it wasn't and I did an attempt). Do you
have an idea on how to obtain the object attributes exported with a trick?
Thank you very much.
Luigi
More information about the dbus
mailing list