From: Xiaofan C. <xia...@gm...> - 2012-01-27 13:24:10
|
On Fri, Jan 27, 2012 at 8:24 PM, Xiaofan Chen <xia...@gm...> wrote: >>> I have no idea why Mac OSX is failing, I need to look on it >>> more carefully... >> >> Hopefully there are other Mac OS X users who can confirm >> whether the libusb01 backend works for them or not. I just >> got my Mac Mini two months ago so I am a new OS X user. >> > > Just another data point, pyusb-0.4.3 seems to work. > It seems that this issue has been reported before. http://comments.gmane.org/gmane.comp.python.pyusb.user/386 So I created a new Trac ticket here. https://sourceforge.net/apps/trac/pyusb/ticket/10 mymacmini:pyusb xiaofanc$ python Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import usb.core >>> import usb.util >>> import usb.backend.libusb01 >>> usbe = usb.backend.libusb01.get_backend() >>> usbe <usb.backend.libusb01._LibUSB object at 0x10fd59050> >>> libusb = usb.backend.libusb01._lib >>> libusb <CDLL '/usr/local/lib/libusb.dylib', handle 10fbd5e00 at 10fd44690> >>> busses = libusb.usb_get_busses() >>> busses <usb.backend.libusb01.LP__usb_bus object at 0x10fce87a0> >>> print busses <usb.backend.libusb01.LP__usb_bus object at 0x10fce87a0> >>> busses.contents Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: NULL pointer access >>> dev=busses[0].devices Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: NULL pointer access >>> busses[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: NULL pointer access >>> type(busses) <class 'usb.backend.libusb01.LP__usb_bus'> >>> type(busses).__bases__ (<type '_ctypes._Pointer'>,) -- Xiaofan |