[英]Executing Serial commands through Python code
Is there any way that I can execute the QNX command "pidin a" from python code. 有什么方法可以从python代码执行QNX命令“ pidin a”。 I'm trying to do this through serial communication through port COM4.
我正在尝试通过COM4端口进行串行通信。
For example, through telnet I can write the code: tn.execute_command('pidin a') 例如,通过telnet,我可以编写代码:tn.execute_command('pidin a')
That will execute the command. 那将执行命令。 How can I do this same thing through serial communication using python code?
我如何通过使用python代码的串行通信来做同样的事情?
使用pyserial ,Python串行端口扩展。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.