dbus/python/tests/test-server.py
Seth Nickell 26c937cb30 2004-05-30 Seth Nickell <seth@gnome.org>
* python/dbus_bindings.pyx.in:

	Add support for ObjectPath type.

	* python/dbus.py:

	Refactor message handling code to a common function.

	* python/tests/test-client.py:
	* python/tests/test-server.py:

	Add tests that check to make sure values of all types
	can be echoed from a service w/o mangling.
2004-05-30 05:30:09 +00:00

17 lines
417 B
Python

import dbus
import gtk
class TestObject(dbus.Object):
def __init__(self, service):
method_list = [ self.Echo ]
dbus.Object.__init__(self, "/TestObject", method_list, service)
def Echo(self, variable):
return variable
session_bus = dbus.SessionBus()
local_service = dbus.Service("org.designfu.Test", bus=session_bus)
local_object = TestObject(local_service)
gtk.main()