How to display the interfaces of a particular dbus bus name (/org/bluez) in python?
Question: I would like to find out what are the available objects and interfaces in the
bluez dbus bus. I wrote a simple python script to list all the bus names in
the dbus session.

    
    
    import dbus
    for service in dbus.SystemBus().list_names():
        print(service)
    

However, I am only interested in the interfaces inside bluez /org/bluez. How
can a python script be written to list down the interfaces inside /org/bluez?

I am using Ubuntu 14.04 and python 2.7


Answer: You can try this:

    
    
    system_bus = dbus.SystemBus()
    objectManager = system_bus.get_object('org.bluez', '/')
    om_iface = dbus.Interface(objectManager, 'org.freedesktop.DBus.ObjectManager')
    
    ifacelist = om_iface.GetManagedObjects()
    

Where `ifacelist` is a Dict of {ObjectPath, Dictof{String, Variant}}}

