mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-25 00:00:17 +01:00
* 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.
17 lines
417 B
Python
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()
|