Hi, <br><br>I've got an application in which I've been using dbus which has worked ok until I tried moving the client code to a place before importing things like gtk and gstreamer. I wanted the client to test the service and see if it was available because doing this before importing those libraries will speed things up a bit.
<br><br>This code works:<br><br>def test_dbus(bus, interface):<br> obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus') <br> dbus_iface = dbus.Interface(obj, 'org.freedesktop.DBus') <br> avail = dbus_iface.ListNames()
<br> return interface in avail<br><br>if test_dbus(bus, 'org.exaile.DBusInterface'):<br> remote_object = bus.get_object("org.exaile.DBusInterface",<br> "/DBusInterfaceObject")<br>iface = dbus.Interface
(remote_object, "org.exaile.DBusInterface")<br>iface.test_service("testing dbus service")<br><br>up until the line that says "iface.test_service", and then it hangs until I get the message:<br>
<br>DbusException: No reply within the specified time<br><br>I've got gobject.threads_init() called before this, I'm not sure what is wrong as this code used to work before I moved the code.<br><br>Adam<br>