Python bindings

Aleksander Morgado aleksander at lanedo.com
Fri Nov 16 02:59:51 PST 2012


>>> 1/ client.get_manufacturer() won't take None as the first argument, but
>>> looking at the gir I can't see why not. As a hack I passed in a function
>>> reference, knowing that its unused anyway.
>>
>> Maybe some missing (allow-none) annotation for the 'input' variable in
>> the async call?
>>
>>> 2/ Where necessary, complex return values should be returned in a tuple.
>>> If
>>> you look at get_manufacturer_ready() you'll see that supposedly the value
>>> is returned in the string passed in to arg1. For me that's always empty,
>>> but I checked with qmicli, the value is populated properly. The page
>>> https://live.gnome.org/PyGObject/IntrospectionPorting suggests that it
>>> should be returning tuples in this case, and its certainly more pythonic.
>> Maybe some missing (out) annotation for each variable returned when
>> reading the TLV from the output bundle?
> 
> Hi Aleksander,
>     Given that GetManufacturer is in the generated stuff, where should I apply 
> my changes so that they appear in its output?
> 

Directly in the code generator sources; under build-aux/qmi-codegen/*.py

-- 
Aleksander


More information about the libqmi-devel mailing list