summaryrefslogtreecommitdiff
path: root/python/examples/example-service.py
diff options
context:
space:
mode:
authorSeth Nickell <seth@gnome.org>2003-09-25 08:46:39 +0000
committerSeth Nickell <seth@gnome.org>2003-09-25 08:46:39 +0000
commitdcc037cc1f008eae9f6a35aca5b1935459e44647 (patch)
treeab2087886c9a851fa3b77c9652303823bd0a6f07 /python/examples/example-service.py
parent6f5fc71b10ab910612b7af767308f52bb8266b1e (diff)
downloaddbus-dcc037cc1f008eae9f6a35aca5b1935459e44647.tar.gz
2003-09-25 Seth Nickell <seth@gnome.org>
* python/dbus.py: * python/dbus_bindings.pyx.in: Handle return values. * python/examples/example-client.py: * python/examples/example-service.py: Pass back return values from the service to the client.
Diffstat (limited to 'python/examples/example-service.py')
-rw-r--r--python/examples/example-service.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/examples/example-service.py b/python/examples/example-service.py
index eb55af44..88f6b500 100644
--- a/python/examples/example-service.py
+++ b/python/examples/example-service.py
@@ -6,10 +6,11 @@ import gtk
class MyObject(dbus.Object):
def __init__(self):
service = dbus.Service("org.designfu.SampleService")
- dbus.Object("/MyObject", [self.HelloWorld], service)
+ dbus.Object("/SomeObject", [self.HelloWorld], service)
- def HelloWorld(self, arg1):
- print ("Hello World!: %s" % (arg1))
+ def HelloWorld(self, hello_message):
+ print (hello_message)
+ return "Hello from example-service.py"
object = MyObject()