using dbus with python

Bryan Clark bclark@redhat.com
Thu Jan 27 12:37:56 PST 2005


Hi Keir ~

I believe you can get the arguments of a message with this function
below.  And just for debugging on this kind of stuff you can do "print
dir(message)" to get all available functions.

Hope that helps,
~ Bryan

On Thu, 2005-01-27 at 19:55 +0000, Keir Lawson wrote:
> #! /usr/bin/python
> 
> #test
> 
> import gtk
> import dbus
> 
> bus = dbus.SessionBus()
> service = bus.get_service("org.gnome.Muine")
> remote_object =
> service.get_object("/org/gnome/Muine/Player","org.gnome.Muine.Player")
> 
> def foobar(interface, signal_name, service, path, message):
>         print type(message)
	print message.get_arg_list()

> remote_object.connect_to_signal("SongChanged", foobar)
> 
> gtk.main()




More information about the dbus mailing list