|
From: Ray S. <ra...@bl...> - 2006-09-12 00:41:59
|
At 04:06 PM 9/11/2006, you wrote: >On 9/8/06, Ray Schumacher <ra...@bl...> wrote: >> I just tried to wrap libusb0.dll with ctypes' codegenerator, >> http://starship.python.net/crew/theller/ctypes/old/codegen.html >> >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h -o usb.xml -c >> > >Sorry I am not so sure what you want to achieve but you might want to >look at the following two projects if you want to use libusb with Python. >Both works under Linux/Windows/Mac OS X. Hi Xiaofan, I've been trying pyusb, but getting some errors in the bulkreads, so I'm trying to work around it. I did just get codegenerator to wrap libusb0.dll, but have not written code for it yet. >1) BITPIM libusb Python wrapper >http://www.bitpim.org/pyxr/c/projects/bitpim/src/native/usb/usb.py.html > >Mark Rages is using it for the pyk project, a Python program to talk >to PICkit 2 (a small USB programmer for Microchip PICs) under Linux. >I've tried it under Windows and it works well. What/which did you use? I just downloaded from http://svn.sourceforge.net/viewvc/bitpim/releases/0.9.07/src/native/usb/ and got "ImportError: libusb not supported on win32" under Python >2) PyUSB >http://pyusb.berlios.de/ > >I've tested it with PICKit 2 and it works too. It mostly works for me, but for some odd bulkread data drop/error. Thanks, Ray |