summaryrefslogtreecommitdiffstats
path: root/python/examples/example-client.py
blob: 0270ed6cfd316734e4897b3a7c8ea0387a162f4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import dbus

bus = dbus.SessionBus()
remote_service = bus.get_service("org.designfu.SampleService")
remote_object = remote_service.get_object("/SomeObject",
                                          "org.designfu.SampleInterface")

hello_reply_list = remote_object.HelloWorld("Hello from example-client.py!")

hello_reply_tuple = remote_object.GetTuple()

hello_reply_dict = remote_object.GetDict()

print (hello_reply_list)

print str(hello_reply_tuple)

print str(hello_reply_dict)