如何在 windows 上的 python 中创建 COM 端口

How to create COM-port in python on windows

我正在尝试在 python 中创建串行端口。我将使用它与另一个通过串行端口进行通信的程序进行通信。 PySerial 包看起来不错,但我无法让它工作。我到处都看过,每个实现都是针对 linux。 谁能帮我在 windows 和 read/write 上创建一个 COM 端口?

无法在 Python 中创建串行端口,因为您需要为此任务使用特殊的驱动程序。您只能调用将为您完成的第 3 方实用程序(带有驱动程序)。

我建议尝试以下实用程序:

Com0Com: http://sourceforge.net/projects/com0com/

虚拟零调制解调器:http://www.virtual-null-modem.com/