summaryrefslogtreecommitdiff
path: root/python/examples/example-service.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/example-service.py')
-rw-r--r--python/examples/example-service.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/python/examples/example-service.py b/python/examples/example-service.py
new file mode 100644
index 00000000..eb55af44
--- /dev/null
+++ b/python/examples/example-service.py
@@ -0,0 +1,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()