using dbus with python

Keir Lawson keir@thelawsons.plus.com
Thu Jan 27 11:55:30 PST 2005


hello, im new to dbus and am attempting to use it in conjuntion with
muine to create a "now listening to" area in my blog. Documentation on
the python interface seems extremly thin on the ground, however by
adapting the example signal client in CVS i have managed to achieve a
little. I can get my script to recieve messages from muine, however,
once i have those messages i havent a clue how to disect them, ie
retrieve the album name, band name etc.  I assume this is very easy to
do, and probally just stupidity on my part, but could some one please
help me? my code is curently looking like this (in the little test i
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)

remote_object.connect_to_signal("SongChanged", foobar)

gtk.main()

Could you also CC me on any replies to this as im not subscribed to the
list

Keir Lawson
-- 



More information about the dbus mailing list