Python Serial Port Objects under Windows
Python
infostam Pte. Ltd.
Last Update il y a 6 mois
The Python Serial Port Extension for Win32, OSX, Linux, BSD, Jython, IronPython encapsulates the access for the serial port.
The serial.tools.list_ports module can be executed to get a list of ports.
It also contains the comports functions which returns a list of ListPortInfo objects.
However, comports will return both Ports and Modem objects/items together in no particular order.
With a small additional code snippet it is possible to filter for Ports or Modem class only.
Which results
The complete unfiltered list is