EvaluationEfficiencyOptimiz.../davisAPI/get_ports.py.save

16 lines
405 B
Plaintext
Raw Normal View History

2024-10-08 17:47:23 +04:00
import serial.tools.list_ports
ports = serial.tools.list_ports.comports()
for port, desc, hwid in sorted(ports):
print("{}: {} [{}]".format(port, desc, hwid))
available_ports = {}
for port in ports:
print(port.serial_number)
available_ports['/dev/' + port.name] = port.vid
devices = [port for port in available_ports.keys()]
print(devices)
print(ports[1].manufacturer)
#print(ports[0].name)