#!/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") try: properties = element.GetProperties() if (properties["Type"] != "network"): continue if (properties["Enabled"] == dbus.Boolean(1)): print "Disabling %s" % (path) element.Disable() except: pass