我是 Pyserial 和硬件领域的新手。我正在尝试运行http://pyserial.sourceforge.net/shortintro.html#opening-serial-ports中给出的示例应用程序
import serial
ser = serial.Serial(0) # open first serial port
print ser.portstr # check which port was really used
ser.write("hello") # write a string
ser.close()
我已经在 python 文件中编写了这个程序并运行它。现在,如果我想测试这个应用程序以检查我是否发送了正确的字符串(例如:超级终端或其他东西),我该怎么做。谁能指导我?