summaryrefslogtreecommitdiff
path: root/python/examples/example-service.py
blob: 79fb009d2aedb90dcd2250ceaaec3f5f24c2f133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import dbus

import pygtk
import gtk

class SomeObject(dbus.Object):
    def __init__(self, service):
        dbus.Object.__init__(self, "/SomeObject", [self.HelloWorld], service)

    def HelloWorld(self, hello_message):
        print (hello_message)
        return "Hello from example-service.py"


service = dbus.Service("org.designfu.SampleService")
object = SomeObject(service)

gtk.main()