def _inputLoop(self):
        """ Loop and copy console->serial until EXIT_CHARCTER character is found. """
        try:
            while self.alive:
                try:
                    c = console.getkey()                    
                except KeyboardInterrupt:
                    print('kbint')
                    c = serial.to_bytes([3])
                if c == self.EXIT_CHARACTER: 
                    self.stop()
                elif c == '\n':
                    # Convert newline input into \r
                    self.serial.write(self.WRITE_TERM)
                    if self.echo:
                        # Locally just echo the real newline
                        sys.stdout.write(c)
                        sys.stdout.flush()
                else:
                    #print('writing: ', c)
                    self.serial.write(c)
                    if self.echo:
                        sys.stdout.write(c)
                        sys.stdout.flush()
        except:
            self.alive = False
            raise
def _inputLoop ( self ) : try : while self . alive : try : c = console . getkey ( ) except KeyboardInterrupt : print ( 'kbint' ) c = serial . to_bytes ( [ 3 ] ) if c == self . EXIT_CHARACTER : self . stop ( ) elif c == '\n' : self . serial . write ( self . WRITE_TERM ) if self . echo : sys . stdout . write ( c ) sys . stdout . flush ( ) else : self . serial . write ( c ) if self . echo : sys . stdout . write ( c ) sys . stdout . flush ( ) except : self . alive = False raise
Loop and copy console->serial until EXIT_CHARCTER character is found.