[New-bugs-announce] [issue16283] ctypes.util.find_library does not find all DLLs anymore

Marcus von Appen report at bugs.python.org
Fri Oct 19 10:52:58 CEST 2012


New submission from Marcus von Appen:

ctypes.util.find_library does not seem to be able to find certain libraries in Python3.3 on Win32 platforms anymore, if the library suffix is omitted. For some reason, os.path.isfile() in ctypes.util.find_library returns False in those cases.

Please try out the attached test script. This produces the following output on a Windows 7 x64 system for me (given that a OpenAL32.dll is installed):


C:\>c:\Python27-x64\python.exe ct_test.py

Python build: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
Path 'C:\Windows\system32' exists in $PATH: True
File 'C:\Windows\system32\OpenAL32.dll' exists: True
ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll
ctypes says for 'OpenAL32': C:\Windows\system32\OpenAL32.dll


C:\>c:\Python31-x64\python.exe ct_test.py

Python build: 3.1.4 (default, Jun 12 2011, 14:16:16) [MSC v.1500 64 bit (AMD64)]
Path 'C:\Windows\system32' exists in $PATH: True
File 'C:\Windows\system32\OpenAL32.dll' exists: True
ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll
ctypes says for 'OpenAL32': C:\Windows\system32\OpenAL32.dll

C:\>c:\Python32-x64\python.exe ct_test.py

Python build: 3.2.3 (default, Apr 11 2012, 07:12:16) [MSC v.1500 64 bit (AMD64)]
Path 'C:\Windows\system32' exists in $PATH: True
File 'C:\Windows\system32\OpenAL32.dll' exists: True
ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll
ctypes says for 'OpenAL32': C:\Windows\system32\OpenAL32.dll

C:\>c:\Python33-x64\python.exe ct_test.py

Python build: 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)]
Path 'C:\Windows\system32' exists in $PATH: True
File 'C:\Windows\system32\OpenAL32.dll' exists: True
ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll
ctypes says for 'OpenAL32': None

----------
components: ctypes
files: ct_test.py
messages: 173315
nosy: marcusva
priority: normal
severity: normal
status: open
title: ctypes.util.find_library does not find all DLLs anymore
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file27618/ct_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16283>
_______________________________________


More information about the New-bugs-announce mailing list