I think if you want the counter example not to work as expected, this is what I get:
>>> serial.tools.list_ports.comports()
[('/dev/tty.Bluetooth-Incoming-Port', '/dev/tty.Bluetooth-Incoming-Port', '/dev/tty.Bluetooth-Incoming-Port'), ('/dev/tty.Bluetooth-Modem', '/dev/tty.Bluetooth-Modem', '/dev/tty.Bluetooth-Modem'), ('/dev/tty.usbserial-A1024XBO', '/dev/tty.usbserial-A1024XBO', '/dev/tty.usbserial-A1024XBO')]
where the FTDI USB to serial adapter is connected. Expected because here is the function comports():
def comports():
"""scan for available ports. return a list of device names."""
devices = glob.glob('/dev/tty.*')
return [(d, d, d) for d in devices]
cygwin, BSD, NetBSD, IRIX, HP-UX, Solaris/SunOS, AIX...
? , pyserial - 2.6, : -)
(2.7) pypi, :
>>> serial.tools.list_ports.comports()
[['/dev/cu.Bluetooth-Incoming-Port', 'n/a', 'n/a'], ['/dev/cu.Bluetooth-Modem', 'n/a', 'n/a'], ['/dev/cu.usbserial-A1024XBO', 'FT232R USB UART', 'USB VID:PID=403:6001 SNR=A1024XBO']]
, pyserial setup.py . unix. , VID:PID , , . , , - : vid, pid = sp[2].split(' ')[1].split('=')[-1].split(':') ( , , , ?), , szHardwareID_str = 'USB VID:PID=%s:%s SNR=%s' % (m.group(1), m.group(2), m.group(4)) !)
, , pyserial , : On some systems description and hardware ID will not be available (None)., 'n/a'. , pyserial 2.8: -)