Trying introspect with python bindings
John (J5) Palmieri
johnp at redhat.com
Sun Mar 13 19:32:00 PST 2005
On Sun, 2005-03-13 at 14:51, Tako Schotanus wrote:
> Using the latest CVS version I changed the list-system-services.py
> (which might be renamed to list-sytem-names.py) to try to let it return
> the introspection data for the DBus object but without any luck. This is
> what the (extra) code looks like:
>
> dbus_info = dbus_service.get_object('/org/freedesktop/DBus',
> 'org.freedesktop.Introspectable')
> introspect = dbus_info.Introspect()
> print str(introspect)
>
> and this is what it returns:
>
> Traceback (most recent call last):
> File "list-session-services.py", line 25, in ?
> introspect = dbus_info.Introspect()
> File "/home/tako/projects/dbus/dbus/python/dbus.py", line 235, in
> __call__
> reply_message =
> self._connection.send_with_reply_and_block(message, 5000)
> File "/home/tako/projects/dbus/dbus/python/dbus_bindings.pyx", line
> 524, in dbus_bindings.Connection.send_with_reply_and_block
> raise DBusException, error.message
> dbus_bindings.DBusException: org.freedesktop.DBus does not understand
> message Introspect
>
> it does not give an error in the first line asking the object for its
> interface so I assume DBus implements it (it should, shouldn't it? ;-)).
>
> Does anybody have any idea why this doesn't work?
> bus_info = dbus_service.get_object('/org/freedesktop/DBus',
> 'org.freedesktop.Introspectable')
This doesn't actually call the remote object. It just sets properties
on the proxy object. I don't think /org/freedesktop/DBus supports
introspection as of yet.
--
J5
More information about the dbus
mailing list