All pastes #597603 Raw Edit

Anonymous

public python v1 · immutable
#597603 ·published 2007-06-30 18:29 UTC
rendered paste body
class Dbus:    def __init__():        if test_dbus('org.gnome.Banshee') == True:            pass        else:            xchat.prnt("Banshee is not registered with DBus. Please start Banshee.")            sys.exit()        banshee_obj = bus.get_object('org.gnome.Banshee', '/org/gnome/Banshee/Player')        banshee_iface = dbus.Interface(banshee_obj, 'org.gnome.Banshee.Core')                def test_dbus(service):        obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')	iface = dbus.Interface(obj, 'org.freedesktop.DBus')		if service in iface.ListNames():	    return True	else:	    return False