Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109048

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

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5
Date Tue, 24 May 2016 17:45:41 +1000
Lines 11
Message-ID <mailman.48.1464075943.20402.python-list@python.org> (permalink)
References <ab93ffe6-2115-4132-aba3-9a326a7a547d@googlegroups.com> <eaacbbbe-3013-484b-a916-943d1c9f97db@googlegroups.com> <CAPTjJmraVH=HLtV1GXec5Mqu+WR5U5sFAHCcNzcypBHy6a6eNw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de sDit1cVHChSQO9avAlSSfwfyVTmK82N8LCPWX7xEsYxg==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'binary': 0.05; 'cc:addr :python-list': 0.09; 'messing': 0.09; 'subject:2.7': 0.09; 'subject:library': 0.09; 'python': 0.10; 'python.': 0.11; '2.7': 0.13; 'subject: \n ': 0.15; '2016': 0.16; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:versus': 0.16; 'warranty;': 0.16; 'wrote:': 0.16; 'basically': 0.18; 'library,': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'compiled': 0.32; 'tue,': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'received:74.125.82': 0.35; 'but': 0.36; 'apple': 0.36; 'stock': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'doing': 0.38; 'turned': 0.38; 'wrong': 0.38; 'shared': 0.38; 'your': 0.60; 'results.': 0.67; '5:15': 0.84; 'chrisa': 0.84; 'received:74.125.82.47': 0.84; 'replies.': 0.84; 'to:none': 0.91; 'results,': 0.91; 'subject:results': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=5vVdfTejLbaKA7NcnyBlhIDdNvpjy9Spz2PuRNjOWzc=; b=yNSHc7VolLAcQU/eXy+GAsOTaNxWD7XUH56W/EsJvJKVOa4fK0Q/8drqreRCD9XlVF 7Crx5WDMQXV6mPI0bD516xPhfQQQlRCccHptJcJ0pTXlPWd5E4j8LqPJ1lYUxY1nu4Wx H8byvVUD/rqacoFE9XXgDbcwn0e+ZUqwuzdkikO31qmo1NGrtJLDOZh+nn1FkfHNGTst LCtzruuT/NSxyR2t084fMtKBobgqe2aEOw0m3MjEdY1JiaInOfdIkal+5VZ5H4M2iCqy y5iH83zTCkR/7XE0L3ZyEVsHziA/Wk3GvPNnZeWjlu2F6rME4ra4Tl/VtoWroQCTvJ9L kv9A==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=5vVdfTejLbaKA7NcnyBlhIDdNvpjy9Spz2PuRNjOWzc=; b=Mc+E2FuGQWz0Jl/Of/vPo4TZxDYaGzbXWhhf9W+Cf2r8sjnkZprVYInkcAbYlSV/ki /dOCDemEParQCLf+j+43M7knvfRj5ejRHHKH+KpXC7wANzRmDjrSKQbHuYfH9Ehe2V/Y Fz1euSm/546/V07whKSJi/rDuAwXPr222R+CJ91kizd/vzDi/LSCB2ePrpKPcQ34wkOI 8c1WVbIVW0ZrBUxfOL6S/NQJ6/UvDWcW3eG0+VkYaYVwpHS6JeEj3wfiSh/yjZ7MTt0j TZFuPmvKicVZPXhmeTiL0NJFU4QMaxFkv0DlSD9GrPtvkz/655vJf7636+odIAYiSSiB MYAQ==
X-Gm-Message-State ALyK8tJoYPyFqaEhnxvMq2EnNIe3D7X2LqvkqlEhEkZIy9vTXn0yULOtH/KXFID3LyagIzpGBzlkMv0DkYO3hw==
X-Received by 10.194.86.129 with SMTP id p1mr2648623wjz.117.1464075941745; Tue, 24 May 2016 00:45:41 -0700 (PDT)
In-Reply-To <eaacbbbe-3013-484b-a916-943d1c9f97db@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAPTjJmraVH=HLtV1GXec5Mqu+WR5U5sFAHCcNzcypBHy6a6eNw@mail.gmail.com>
X-Mailman-Original-References <ab93ffe6-2115-4132-aba3-9a326a7a547d@googlegroups.com> <eaacbbbe-3013-484b-a916-943d1c9f97db@googlegroups.com>
Xref csiph.com comp.lang.python:109048

Show key headers only | View raw


On Tue, May 24, 2016 at 5:15 PM, Siyi Deng <mr.siyi.deng@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-22 20:15 -0700
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Fabien <fabien.maussion@gmail.com> - 2016-05-23 11:27 +0200
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 20:29 +1000
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 00:15 -0700
    Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Chris Angelico <rosuav@gmail.com> - 2016-05-24 17:45 +1000
      Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 09:18 -0700
        Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Chris Angelico <rosuav@gmail.com> - 2016-05-25 02:26 +1000
        Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Steven D'Aprano <steve@pearwood.info> - 2016-05-25 02:32 +1000
          Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Chris Angelico <rosuav@gmail.com> - 2016-05-25 02:45 +1000
          Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 10:38 -0700
          Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-24 20:14 -0400
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 10:47 -0700

csiph-web