PDA

View Full Version : Python - DBus interface introspection?



Seine
July 2nd, 2007, 03:53 AM
Hi there.

I'm trying to debug the script on this page (http://awn.wetpaint.com/page/Listen+Plugin). For me at least it is throwing DBus exceptions. The purpose of the script is to launch Listen, Just Listen (if not already present) and report current track info to the Avant Window Navigator.

For me, it succeeds in starting Listen, but does not find the method get_title on the Listen DBus interface. If I change the method to current_playing I can call it OK, but the get_title method does not exist. (Even though this method is listed in the source (http://www.listen-project.org/browser/trunk/src/dbus_manager.py#L145)).

Is there a way I can introspect any given DBus interface at runtime to see what methods actually do exist and which don't?

Cheers
Jem

Seine
July 2nd, 2007, 05:36 AM
I've just discovered http://http://dbus.freedesktop.org/doc/dbus-tutorial.html#introspection. I hope it applies to the python bridge as well as direct. I will try it out when I get home tonight and post back. Any info in the meantime is appreciated!

ssam
July 2nd, 2007, 08:53 AM
is this the sort of thing you want

http://www.vitavonni.de/projekte/dbus-inspector.html.en

Seine
July 2nd, 2007, 01:50 PM
Yes, yes, yes!!! Thanks Sam. :popcorn: