python - Accessing USB data -
i wanted read usb data. using pyusb library. , had written script
import usb.core import usb.util device = usb.core.find(bdeviceclass=9) # 9 hub type usb device if device none: sys.exit("could not find id scheme barcode reader.") if device.is_kernel_driver_active(0): print "kernal driver active!" while running giving me error.
usb.core.usberror: [errno 13] access denied (insufficient permissions)
try run file using root user alter user root
sudo su root it inquire root password
after can run file access rights.
or utilize sudo, give access right of root user.
python pyusb
No comments:
Post a Comment