Pyserial官方示例 # Very simple serial terminal # (C)2002-2009 Chris Liechti # Input characters are sent directly (only LF -> CR/LF/CRLF translation is # done), received characters are displayed as is (or escaped trough pythons # repr, useful for debug purposes)