examples: update python examples

Update the raw D-Bus python examples to use newer APIs where
appropriate (and split the add-connection example into 1.0-only and
0.9-compatible versions). Update the gi-based python examples for the
various API changes since they were last updated.

Also add a comment to the ruby add-connection example pointing out
that it's still using the old settings APIs.
This commit is contained in:
Dan Winship
2014-11-13 14:27:26 -05:00
parent 94157ce900
commit 66936decfa
12 changed files with 227 additions and 137 deletions

View File

@@ -48,8 +48,8 @@ if __name__ == "__main__":
sys.exit('Usage: %s <connection name or UUID> [new zone]' % sys.argv[0])
main_loop = GLib.MainLoop()
settings = NM.RemoteSettings.new(None)
connections = settings.list_connections()
client = NM.Client.new(None)
connections = client.get_connections()
con_name = sys.argv[1]
if len(sys.argv) == 3: