コード例 #1
0
def DiscoverLocalHIDU2FDevices(selector=HidUsageSelector):
    for d in hid.Enumerate():
        if selector(d):
            try:
                dev = hid.Open(d['path'])
                yield UsbHidTransport(dev)
            except OSError:
                # Insufficient permissions to access device
                pass
コード例 #2
0
def main():
    devs = hid.Enumerate()
    for dev in devs:
        print(dev)