dbus/python/examples/example-service.py
Seth Nickell 2b1d98c76b 2003-09-25 Seth Nickell <seth@gnome.org>
* python/examples/example-service.py:

	Johan notices complete wrong code in example-service, but
	completely wrong in a way that works exactly the same (!).
	Johan is confused, how could this possibly work? Example
	code fails to serve purpose of making things clear.
	Seth fixes.
2003-09-25 09:34:50 +00:00

18 lines
395 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"
service = dbus.Service("org.designfu.SampleService")
object = SomeObject(service)
gtk.main()