ubuntu - How to display the interfaces of a particular dbus bus name (/org/bluez) in python? -


i find out available objects , interfaces in bluez dbus bus. wrote simple python script list bus names in dbus session.

import dbus service in dbus.systembus().list_names():     print(service) 

however, interested in interfaces inside bluez /org/bluez. how can python script written list down interfaces inside /org/bluez?

i using ubuntu 14.04 , python 2.7

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 dict of {objectpath, dictof{string, variant}}}


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -