Python non-variant is passed as an argument
captain.deadly at gmail.com
Thu Mar 25 08:16:37 PDT 2010
I'm calling a navit dbus method which returns an object 'o':
object = nav.callback_attr_new("DestinationSet", "destination")
I then have to pass the return from this method on to another method
which takes a String and a variant 'sv':
now this won't work because:
Method "add_attr" with signature "so" on interface "(null)" doesn't exist
Which is fair enough. I knew that the method took a variant but then I'd
read a sentence:
If a non-variant is passed as an argument but introspection indicates
that a variant is expected, it'll automatically be wrapped in a variant.
in the documentation . Is this documentation correct? I'd assumed
that the python DBus would be doing introspection. I'll go and try to
work out how you cast the 'o' object into a variant in Python. Never
used that mechanism.
If anybody can suggest a solution I'd be very grateful. Mean time off
for a search.
More information about the dbus