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

import pygtk
import gtk

class MyObject(dbus.Object):
    def __init__(self):
        service = dbus.Service("org.designfu.SampleService")
        dbus.Object("/MyObject", [self.HelloWorld], service)

    def HelloWorld(self, arg1):
        print ("Hello World!: %s" % (arg1))

object = MyObject()

gtk.main()