rendered paste bodyclass 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