import select import sys print("Starting echo server over USB UART") print("...") while True: if select.select([sys.stdin], [], [], 0)[0]: characters = sys.stdin.readline() print(f"Recieved: {characters.strip()}")