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

import dbus

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

hello_reply_list = remote_object.HelloWorld("Hello from example-client.py!", dbus_interface = "org.designfu.SampleInterface")

hello_reply_tuple = iface.GetTuple()

hello_reply_dict = iface.GetDict()

print (hello_reply_list)

print str(hello_reply_tuple)

print str(hello_reply_dict)

print remote_object.Introspect(dbus_interface="org.freedesktop.DBus.Introspectable")