def start_capture(self): """Begin listening for output from the stenotype machine.""" try: self._machine = hid.device(VENDOR_ID, 1) self._machine.set_nonblocking(1) except IOError as e: self._error() return return ThreadedStenotypeBase.start_capture(self)
def start_capture(self): """Begin listening for output from the stenotype machine.""" try: self._machine = hid.device(VENDOR_ID, 1) self._machine.set_nonblocking(1) except IOError as e: log.info('Treal device not found: %s', str(e)) log.warning('Treal is not connected') self._error() return return ThreadedStenotypeBase.start_capture(self)
def __init__(self, params): ThreadedStenotypeBase.__init__(self) self._machine = None
def stop_capture(self): """Stop listening for output from the stenotype machine.""" ThreadedStenotypeBase.stop_capture(self) if self._machine: self._machine.close() self._stopped()