blob: a467410d088b9e3b6b43772b2890dc5a25eb02d2 [file] [log] [blame]
Ed Tanousc9b55212017-06-12 13:25:51 -07001# Copyright (c) Benjamin Kietzman (github.com/bkietz)
2#
3# Distributed under the Boost Software License, Version 1.0. (See accompanying
4# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6import dbus
7from dbus.mainloop.glib import DBusGMainLoop
8from gobject import MainLoop
9
10bus_name = 'com.example.Sample'
11session_bus = dbus.SessionBus(mainloop=DBusGMainLoop())
12
13example_remote = session_bus.get_object(bus_name, '/path/to/obj')
14example = dbus.Interface(example_remote, bus_name+'.Iface')
15
16example.StringifyVariant(123)
17print example.GetLastInput()
18
19MainLoop().run()