You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
261 B

#!/usr/bin/env python
import sys
import labhw
name = 'Arduino__www_arduino_cc__75833353035351903182'
name = sys.argv[1]
devices = labhw.list_USB_devices()
try:
print(devices[name])
except KeyError as e:
raise RuntimeError(f"unknown device {name}")