I want to discover all serial devices on my Windows PC, via a Python script. How can I achieve this properly ?
The ugly way is to try opening COM1, COM2, ..., COM9999 (what is the limit ?), and when an exception is raised, then conclude that no device is there.