dbus/python/examples/example-service.py
Seth Nickell 7dc64ab60a 2004-05-30 Seth Nickell <seth@gnome.org>
* python/examples/example-client.py:
	* python/examples/example-service.py:

	Take it back. Lists seem to work but they're broken
	in the test suite. Make the base examples use
	lists (works fine).
2004-05-30 06:26:24 +00:00

18 lines
448 B
Python

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"]
session_bus = dbus.SessionBus()
service = dbus.Service("org.designfu.SampleService", bus=session_bus)
object = SomeObject(service)
gtk.main()