Most of the serial tools you are familiar with are probably written in C++. You may want to get a third-party library from Github, or use a Windows API to enumerate serial ports directly, or use the QSerialPort module wrapped in Qt. But the general C++ project is quite large, and tedious, sometimes compilation also takes time, I am a lazy person, if this debugging tool is not used in the project, I do not want to write in C++.

The Python serial port module can be used as serial.tools.list_ports, which can implement almost all of your basic functions by importing this module.

Enumerating serial ports also takes only one line of code

Initialize the serial port and set the baud rate

Then you can read and write data directly

Of course, this is only used for debugging serial port. Someone wants to use it for debugging guide servo motor.