I added some preliminary log support to PyUSB at revision 56, it uses the logging module. Currently, you can define the environment variable PYUSB_DEBUG_LEVEL with the following values: critical, error, warning, information, debug. Running tests with debug defined, explain why get_backend failed with a stack trace. I hope this can help to find bugs. It is very raw and there are few messages yet.
Wander 2010/4/6 Xiaofan Chen <xiaof...@gmail.com>: > On Mon, Apr 5, 2010 at 6:46 PM, Wander Lairson <wander.lair...@gmail.com> > wrote: > >> When I port 1.0 windows backend, I will check. But maybe not in time >> for alpha 0 release. > > No problem. Take your time. I just think pyusb will be a nice test > bed for libusb 1.0 Windows backend as well. > > It seems to me that libusb 0.1 backend is kind of working already under > Windows. Take your time for the libusb 1.0 Windows backend. > > C:\Python26>python > Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] > on > win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> import usb >>>> import usb.core >>>> import usb.util > >>>> import usb.backend.libusb10 >>>> a=usb.backend.libusb10.get_backend() > Exception ValueError: 'Procedure probably called with too many arguments (4 > byte > s in excess)' in <bound method _Initializer.__del__ of > <usb.backend.libusb10._In > itializer object at 0x026B28F0>> ignored > > >>>> import usb.backend.libusb01 >>>> b=usb.backend.libusb01.get_backend() >>>> assert b is not None >>>> dev1=usb.core.find(idVendor=0xFFFE,backend=b) >>>> assert dev1 is not None >>>> ep1 =usb.util.find_descriptor(dev1.get_interface_altsetting(),custom_match >>>> = > lambda e: usb.util.endpoint_direction(e.bEndpointAddress) == > usb.util.ENDPOINT_ > OUT) >>>> ep81 =usb.util.find_descriptor(dev1.get_interface_altsetting(),custom_match > = lambda e: usb.util.endpoint_direction(e.bEndpointAddress) == > usb.util.ENDPOINT > _IN) >>>> dev1.set_configuration() >>>> ep1.write('test') > 4 >>>> ep81.read(64) > array('B', [116, 101, 115, 116]) > > -- > Xiaofan http://mcuee.blogspot.com > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users