ctypes

CTO debatem1 at gmail.com
Fri May 1 00:46:31 CEST 2009


At the risk of self-promotion, you may want to try <a href="http://
code.activestate.com/recipes/576731/"> this recipe </a>. Then just do
the following:

>>> @C_function("/home/luca/Desktop/luca/progetti_eric/Pico/libusbtc08-1.7.2/src/.libs/libusbtc08.so")
... def usb_tc08_get_single(handle: "c_short", temp: "*c_float",
overflow_flags: "*c_short", units: "c_short") -> "c_short":
...     return usb_tc08_get_single.c_function(handle, temp,
overflow_flags, units)

Make sure to properly handle your arrays, though.



More information about the Python-list mailing list