Get object list in python

Jesse Weinstein jessw at netwood.net
Thu Sep 17 14:34:36 PDT 2009


On Thu, 2009-09-17 at 14:01 -0700, Andy Barry wrote:

> Once I know the numbers, I am able to get all of my data with little
>  trouble.  However, I can't figure out how to get a list of the 
> available objects -- I tried Introspection but running an 
> introspection call on /org/freedesktop/NetworkManager/AccessPoint 
> did not return anything (I know the call was correct because it
>  worked with other paths).
When I run:
dbus.SystemBus().get_object('org.freedesktop.NetworkManager',
'/org/freedesktop/NetworkManager/AccessPoint').Introspect(\
        dbus_interface='org.freedesktop.DBus.Introspectable')

it gives me:

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection
1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="12"/>
</node>

which means that there is one object path that is a child of the given
object path,
specifically: /org/freedesktop/NetworkManager/AccessPoint/12 

Do you get something different, or did you just not realize what the
<node> elements meant? (I don't remember seeing it /documented/
anywhere... ;-) )

I found this out when I was working on my FullIntrospecter tool, which I
mentioned on the list some time ago (to resounding silence).

Jesse



More information about the dbus mailing list