Re: [linux-minidisc] PythonNetMD and MacOS X


Am Dienstag, den 16.02.2010, 00:34 +0100 schrieb Adrian Glaubitz:
> The problem is obvious, the script cannot find the shared libusb
> library even though it has been installed. The library is located in a
> different location when installed with Macports, namely:
> 
> /opt/local/lib/libusb-1.0.dylib

The proper solution uses ctypes.util.find_library, here is a dump from
Linux and one from MacOS:

mkarcher@aquila:~$ python
Python 2.5.4 (r254:67916, Nov 19 2009, 22:14:20) 
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes.util import *
>>> print find_library("usb-1.0")
libusb-1.0.so.0
>>> 

minimac2:~ zedv$ python
Python 2.6.4 (r264:75706, Feb 4 2010, 14:41:35) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes.util import *
>>> print find_library("usb-1.0")
/opt/local/lib/libusb-1.0.dylib
>>>

Regards,
  Michael Karcher

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil