Python non-variant is passed as an argument

Arigead captain.deadly at gmail.com
Fri Mar 26 01:41:19 PDT 2010


Simon McVittie wrote:
> On Thu, 25 Mar 2010 at 15:16:37 +0000, Arigead wrote:
>> in the documentation [1]. Is this documentation correct? I'd assumed
>> that the python DBus would be doing introspection.
> 
> It does, unless you specifically ask it not to. Does navit reply correctly
> to the Introspect() method?
> 
> (If not, then the best dbus-python can possibly do is to guess, from the
> arguments you've given it, what types the method is meant to receive -
> if its guesses are wrong then you'll have to either work around that
> deficiency in navit, or get it fixed.)
> 
>> I'll go and try to
>> work out how you cast the 'o' object into a variant in Python.
> 
> Like so:
> 
>     navit.SomeMethod("callback", dbus.ObjectPath(my_o_object, variant_level=1))
> 
> Or, override the introspected/guessed signature with what you know it to be,
> and dbus-python will do the right thing:
> 
>     navit.SomeMethod("callback", my_o_object, signature='sv')
> 
>   S

Thanks a million for the Advice Simon I'll have a word on the navit IRC
and see what they say. I thought they did support Introspection but
maybe they don't and I wrongly assumed that they did.

Thanks again for your response.


More information about the dbus mailing list