Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import usb, usb.core, usb.util, usb.backend.libusb1
- ...snippet...
- # usb.core.find()
- # find our device
- dev = usb.core.find(idVendor= ...., idProduct= ....)
- #dev_1 = usb.util.find_descriptor(cfg, find_all =True)
- # was it found?
- if dev is None:
- raise ValueError('Device not found')
- #x = dev.set_configuration()
- #print (dev)
- #print (help(usb.core))
- if usb.core.find(find_all=True, bDeviceClass=7) is None:
- raise ValueError('No printer found')
Add Comment
Please, Sign In to add comment