#!/usr/bin/python import dbus bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"), 'org.moblin.connman.Manager') elements = manager.ListElements() for path in elements: element = dbus.Interface(bus.get_object('org.moblin.connman', path), 'org.moblin.connman.Element') properties = element.GetProperties() if (properties["Type"] != "device"): continue print "[ %s ]" % (path) element.Enable()