summaryrefslogtreecommitdiffstats
path: root/python/examples/example-client.py
blob: 7439e6bdd9ec5fdacc0be17e09f2b8370ac83365 (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_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")