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

Chris Angelico rosuav at gmail.com
Tue May 24 03:45:41 EDT 2016


On Tue, May 24, 2016 at 5:15 PM, Siyi Deng <mr.siyi.deng at gmail.com> wrote:
> Thanks for all the replies.
>
> It turned out that the Apple OS X stock python 2.7 gives the wrong results, but other distributions like 2.7 from miniconda gives the correct results. Facepalm.

When you use a binary shared library, it has to be compiled against
the correct Python. You're messing around with ctypes, so basically
you've voided your warranty; *everything* you're doing is
platform-specific. Have fun. :)

ChrisA



More information about the Python-list mailing list