Posted by vArDo on Mon 16 Jun 00:10
report abuse | download | new post
- #!/usr/bin/env python
- INTERFACE = 'org.gajim.dbus.RemoteInterface'
- SIGNAL_NAME = 'NewMessage'
- from dbus.mainloop.glib import DBusGMainLoop
- DBusGMainLoop(set_as_default=True)
- import dbus
- bus = dbus.SessionBus()
- def dog_barks(data):
- print "Data: %s"%(data)
- print "Dog barks"
- bus.add_signal_receiver(dog_barks, signal_name=SIGNAL_NAME,
- dbus_interface=INTERFACE)
- import gobject
- loop = gobject.MainLoop()
- loop.run()
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.