list-profiles revision 2f48d9572459c2c90d68e8b017b86eb843fe2a74
1#!/usr/bin/python
2
3import dbus, flimflam
4
5flim = flimflam.FlimFlam(dbus.SystemBus())
6
7active = flim.GetActiveProfile()
8
9for profile in flim.GetObjectList("Profile"):
10    if profile.object_path == active.object_path:
11        print "[ %s ]  <== active" % (profile.object_path)
12    else:
13        print "[ %s ]" % (profile.object_path)
14
15    properties = profile.GetProperties(utf8_strings = True)
16    for key in properties.keys():
17        print "    %s = %s" % \
18            (key, flimflam.convert_dbus_value(properties[key], 4))
19
20    print
21