# Pastebin NDexUgGI while True: try: print repr(ser.readline()) except serial.serialutil.SerialException, e: print e break