This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Change in behavior (bug) in ctypes
- From: Marvin Greenberg <public dot marvin at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 30 Jun 2016 10:05:27 -0400
- Subject: Change in behavior (bug) in ctypes
- Authentication-results: sourceware.org; auth=none
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