#!/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}")