Project

General

Profile

« Previous | Next » 

Revision f94cb2af

Added by David Sorber almost 8 years ago

Gah! Three spaces????!!!!??? THE HORROR!

View differences:

software/dbus_test/client.py
import dbus
class Client():
def __init__(self):
bus = dbus.SystemBus()
service = bus.get_object('com.example.service', "/com/example/service")
self._message = service.get_dbus_method('get_message', 'com.example.service.Message')
self._quit = service.get_dbus_method('quit', 'com.example.service.Quit')
def __init__(self):
bus = dbus.SystemBus()
service = bus.get_object('com.example.service', "/com/example/service")
self._message = service.get_dbus_method('get_message', 'com.example.service.Message')
self._quit = service.get_dbus_method('quit', 'com.example.service.Quit')
def run(self):
print("Mesage from service:", self._message())
self._quit()
def run(self):
print("Mesage from service:", self._message())
self._quit()
if __name__ == "__main__":
Client().run()
Client().run()

Also available in: Unified diff