controlar múltiples dispositivos a través de USB en python? posible ?
Frecuentes
Visto 830 equipos
1 Respuestas
0
An example of a loop to list connected USB devices from aquí.
#!/usr/bin/python
import sys
import usb.core
# find USB devices
dev = usb.core.find(find_all=True)
# loop through devices, printing vendor and product ids in decimal and hex
for cfg in dev:
sys.stdout.write('Decimal VendorID=' + str(cfg.idVendor) + ' & ProductID=' + str(cfg.idProduct) + '\n')
sys.stdout.write('Hexadecimal VendorID=' + hex(cfg.idVendor) + ' & ProductID=' + hex(cfg.idProduct) + '\n\n'
contestado el 28 de mayo de 14 a las 15:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas python or haz tu propia pregunta.
This only works if the device has the attributes set to your naming convention, in my case did not work, but the answer as a whole can be extrapolated - Jason v