delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/06/30/10:05:48

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=S8n
kI+SusoSd6Nd1Ve4dR/jnXUojv0o123EANryXq39HzYImiMwbak24qGcZy4nDm8p
JDzWJwDXD900bk4hZGIgFXWwZWhiZ3BRWloj/YJyEczRLBRQH8UrYFJIqCUjI8y5
vCwBLbrDVidIQSe2W9YH/6lkS1giEcIloMmj4RRA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=Ps3nT11oM
qXgHp6QOyIjGrk2nGM=; b=Sfh42xQ4ju+60hL4Oqjr76RPLAcC+qFkgBsxW5nZX
rWYZ5JghTlnq3pE40nmXCEMkDh35cysmn2wLA4USZuaSUynZ4j0+NnIEL+q5noAl
R5NikkdRC3+iaNVxqDl+/mMlv5vAMqrJZZ44o6EBWwStLotMs2+b1NOgqtoqqGmO
7g=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=BAYES_50,FREEMAIL_FROM,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*UA:3.0.11, H*u:3.0.11, Checker, Enterprise
X-HELO: tardis.tena-sda.org
Message-ID: <57752727.9070706@gmail.com>
Date: Thu, 30 Jun 2016 10:05:27 -0400
From: Marvin Greenberg <public DOT marvin AT gmail DOT com>
User-Agent: Postbox 3.0.11 (Macintosh/20140602)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Change in behavior (bug) in ctypes

Code like this was working until sometime recently,

$ python
 >>> import ctypes
 >>> cygdll = ctypes.cdll.cygwin1

But with the latest cygwin update, it is failing.  On a couple older 
machines, I do:


$ python -c "import ctypes; print ctypes._dlopen('cygwin1')"; cygcheck 
-V; python -V
6442713088
cygcheck (cygwin) 2.1.0
System Checker for Cygwin ...<snip>
Python 2.7.10

$  python -c "import ctypes; print ctypes._dlopen('cygwin1')"; cygcheck 
-V; python -V
6442713088
cygcheck (cygwin) 2.5.1
System Checker for Cygwin ...<snip>
Python 2.7.10

This last was on a windows 8.1 (Windows 8.1 Enterprise Ver 6.3 Build 
9600) system.  I updated cygwin completely on that system to cygwin 
latest from a mirror.  And, then

$  python -c "import ctypes; print ctypes._dlopen('cygwin1')"; cygcheck 
-V; python -V
Traceback (most recent call last):
   File "<string>", line 1, in <module>
OSError: No such file or directory
cygcheck (cygwin) 2.5.2
System Checker for Cygwin  ...<snip>
Python 2.7.10

Note that simply changing the call to explicitly append the dll 
extension works fine:

$  python -c "import ctypes; print ctypes._dlopen('cygwin1.dll')"
6442713088

But that won't work with the former attribute-style of loading the dll.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019