dbus/python/examples/example-service.py
Seth Nickell dcc037cc1f 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.
2003-09-25 08:46:39 +00:00

17 lines
367 B
Python

import dbus
import pygtk
import gtk
class MyObject(dbus.Object):
def __init__(self):
service = dbus.Service("org.designfu.SampleService")
dbus.Object("/SomeObject", [self.HelloWorld], service)
def HelloWorld(self, hello_message):
print (hello_message)
return "Hello from example-service.py"
object = MyObject()
gtk.main()