Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5

Chris Angelico rosuav at gmail.com
Tue May 24 12:26:08 EDT 2016


On Wed, May 25, 2016 at 2:18 AM, Siyi Deng <mr.siyi.deng at gmail.com> wrote:
> I don't quite understand, the binary shared library contains no python interfaces, it should be independent of python. As a matter of fact, I have successfully used it in Conda python 2.7, 3.5,  Julialang as well as c++ executables. I think the fact that only stock python 2.7 failed to run correctly indicates some bug in that python distribution.
>

Ah okay. Still, somehow you have to get the data from the numpy array
to the binary library; and that depends on the exact layout of the
Python object (including pointer sizes and stuff). So your ctypes
interface code might need to be adjusted.

ChrisA



More information about the Python-list mailing list