When running the following code:
import sys
import usb.core
import usb.util
VENDOR_ID = 0x1bcf
PRODUCT_ID = 0x0007
DATA_SIZE = 8
# find the MagTek reader
device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
if device is None:
sys.exit("Could not find device.")
# make sure the hiddev kernel driver is not active
if device.is_kernel_driver_active(0):
try:
device.detach_kernel_driver(0)
except usb.core.USBError as e:
sys.exit("Could not detatch kernel driver: %s" % str(e))
....
I get this error:
File "test.py", line 20, in <module>
if device.is_kernel_driver_active(0):
File "C:\Python26\lib\site-packages\usb\core.py", line 704, in
is_kernel_driver_active
return self._ctx.backend.is_kernel_driver_active(self._ctx.handle,
interface)
File "C:\Python26\lib\site-packages\usb\backend\__init__.py", line 355, in
is_kernel_driver_active
_not_implemented(self.is_kernel_driver_active)
File "C:\Python26\lib\site-packages\usb\backend\__init__.py", line 79, in
_not_implemented
raise NotImplementedError(func.__name__)
NotImplementedError: is_kernel_driver_active
Am I suppose to implement this on my own? Can I just redirect this to another
python module that actually implements this?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users