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.
14 lines
205 B
14 lines
205 B
1 month ago
|
#!/usr/bin/env python
|
||
|
|
||
|
import sys
|
||
|
import labhw
|
||
|
|
||
|
name = sys.argv[1]
|
||
|
|
||
|
devices = labhw.list_USB_devices()
|
||
|
|
||
|
try:
|
||
|
print(devices[name])
|
||
|
except KeyError as e:
|
||
|
raise RuntimeError(f"unknown device {name}")
|