1 # UCC Door Server - example synchronous client
3 # Released under an MIT-style license; see COPYING for details.
7 if __name__ == '__main__':
10 system_bus = dbus.SystemBus()
12 doors = {'uccdoor': None, 'unisfadoor': None, 'chdoor': None, 'mrdoor': None, 'uccpir': None}
14 for door in doors.keys():
15 doors[door] = system_bus.get_object('au.asn.ucc.DoorServer', '/au/asn/ucc/doors/%s' % door)
17 for door, remote_object in doors.items():
18 status = remote_object.get_status(dbus_interface='au.asn.ucc.DoorInterface')
19 print '%s: %d' % (door, status)