2003-09-30 02:41:13 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
import dbus
|
|
|
|
|
|
2004-05-29 22:37:13 +00:00
|
|
|
bus = dbus.SessionBus()
|
2003-09-30 02:41:13 +00:00
|
|
|
remote_service = bus.get_service("org.designfu.SampleService")
|
|
|
|
|
remote_object = remote_service.get_object("/SomeObject",
|
|
|
|
|
"org.designfu.SampleInterface")
|
|
|
|
|
|
2004-05-30 06:26:24 +00:00
|
|
|
hello_reply_list = remote_object.HelloWorld("Hello from example-client.py!")
|
2003-09-30 02:41:13 +00:00
|
|
|
|
2005-02-11 19:51:18 +00:00
|
|
|
hello_reply_tuple = remote_object.GetTuple()
|
|
|
|
|
|
|
|
|
|
hello_reply_dict = remote_object.GetDict()
|
|
|
|
|
|
2004-05-30 06:26:24 +00:00
|
|
|
print (hello_reply_list)
|
2005-02-11 19:51:18 +00:00
|
|
|
|
|
|
|
|
print str(hello_reply_tuple)
|
|
|
|
|
|
|
|
|
|
print str(hello_reply_dict)
|
|
|
|
|
|