aboutsummaryrefslogtreecommitdiffstats
path: root/examples/dbus/test_signal_simple.py
blob: b113fbbc1d51c60fc418c839863f466664b7103a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python

import dbus
from efl import dbus_mainloop
from efl import ecore


def print_name_owner_changed(obj, old, new):
    print "Obj = '%s', Old = '%s', New = '%s'" % (obj, old, new)


dbus_ml = dbus_mainloop.DBusEcoreMainLoop()
bus = dbus.SystemBus(mainloop=dbus_ml)

bus.add_signal_receiver(print_name_owner_changed, "NameOwnerChanged")
ecore.main_loop_begin()