From 6f5fc71b10ab910612b7af767308f52bb8266b1e Mon Sep 17 00:00:00 2001 From: Seth Nickell Date: Thu, 25 Sep 2003 06:57:01 +0000 Subject: 2003-09-24 Seth Nickell * python/dbus.py: Connect Object methods (when you are sharing an object) up... pass in a list of methods to be shared. Sharing all the methods just worked out too weird. You can now create nice Services over the DBus in Python. :-) * python/dbus_bindings.pyx.in: Keep references to user_data tuples passed into C functions so Python doesn't garbage collect on us. Implement MethodReturn and Error subclasses of Message for creating DBusMessage's of those types. * python/examples/example-client.py: * python/examples/example-service.py: Simple example code showing both how create DBus services and objects, and how to use them. --- python/examples/example-client.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 python/examples/example-client.py (limited to 'python/examples/example-client.py') diff --git a/python/examples/example-client.py b/python/examples/example-client.py new file mode 100644 index 00000000..24906b83 --- /dev/null +++ b/python/examples/example-client.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import dbus + +bus = dbus.Bus() +remote_service = bus.get_service("org.designfu.SampleService") +remote_object = remote_service.get_object("/MyObject", "org.designfu.SampleInterface") + +remote_object.HelloWorld("Hello from example-client.py!") -- cgit