dbus-send and method call with dictionaries
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Sep 4 01:43:45 PDT 2007
On Tue, 04 Sep 2007 at 10:10:23 +0200, Vincent Génieux wrote:
> Now i would like to have a dictionary with a variant type for values
> (in_signature=a{sv}), but I don't know if it is possible:
You may find it easier to use a short Python script for complicated
types. It can often be a one-liner (the newlines in this example are
optional):
python -c 'import dbus; print dbus.Bus().call_blocking(
"org.designfu.TestService",
"/org/designfu/TestService/object",
"org.designfu.TestService",
"method2",
"a{sv}",
({"key1": "entry1", "key2": dbus.Int32(42), "key3": True},))'
The parameters to call_blocking() are bus name, object path, interface,
method name, signature and tuple of arguments (it must be a tuple, even
if it has 0 or 1 items).
Simon
More information about the dbus
mailing list