def show_adapter_info():
bus = dbus.SystemBus()
om = dbus.Interface(bus.get_object(SERVICE_NAME, "/"), "org.freedesktop.DBus.ObjectManager")
objects = om.GetManagedObjects()
for path, interfaces in objects.iteritems():
if ADAPTER_INTERFACE not in interfaces:
continue
print(" [ %s ]" % (path))
props = interfaces[ADAPTER_INTERFACE]
for (key, value) in props.items():
if (key == "Class"):
print(" %s = 0x%06x" % (key, value))
elif (key == "UUIDs"):
continue
else:
print(" %s = %s" % (key, value))
print()
评论列表
文章目录