blob: 235da7016a248e5ff8370e7964b95d452c6d1960 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import dbus
import gtk
class TestObject(dbus.Object):
def __init__(self, service):
method_list = [ self.Echo ]
dbus.Object.__init__(self, "/TestObject", service, method_list)
def Echo(self, variable):
return variable
session_bus = dbus.SessionBus()
local_service = dbus.Service("org.designfu.Test", bus=session_bus)
local_object = TestObject(local_service)
gtk.main()
|