GNOME Bugzilla – Bug 740145
update python examples
Last modified: 2014-11-15 14:48:22 UTC
The python examples had gotten out-of-date. Also, testing them out uncovered an introspection annotation bug. danw/examples-bgoXXXXXX
I noticed that the wifi list networks exmaple didn't print the SSID (only <GByteArray 0x25323525>) so I pushed a fixup for that. We should also go through and check other locations for the @array/@len pattern and update the annotation so that they work in python. Also the 'list-connections.py' prints out routes/addresses as "<GPtrArray 0x2352353>", not sure if we can easily fix that up? The rest of the changes look good to me.
(In reply to comment #1) > We should also go through and check other locations for the @array/@len pattern > and update the annotation so that they work in python. Done; they were all in nm-utils, and were all fallout from my changing a bunch of GByteArray-based APIs to not use GByteArray (to make them GByteArray/GBytes agnostic). While scanning for (out) arguments, I also found two more places where we needed (transfer) annotations too, and fixed those. > Also the 'list-connections.py' prints out routes/addresses as "<GPtrArray > 0x2352353>", not sure if we can easily fix that up? It's just printing the raw property value. We can't easily fix it. At some point I want to add "nm_setting_property_to_string()" though... pushed with fixes