Reputation: 21
Python ctype can't find AntTweakBar.dll ?? and the file dosn't exist for python OS file system call, but exists in the c:\Windows\System32 dir.
C:\Users\dkm>dir c:\Windows\System32\ant*dll
Volume in drive C is Windows 7
Volume Serial Number is FC61-5FBB
Directory of c:\Windows\System32
23/07/2012 12:05 AM 641,536 AntTweakBar.dll
22/07/2012 11:43 PM 774,144 AntTweakBar64.dll
2 File(s) 1,415,680 bytes
0 Dir(s) 47,418,232,832 bytes free
C:\Users\dkm>python
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes.util import find_library
>>> import os
>>> print os.path.exists('C:\\Windows\\System32\\antweakbar.dll')
False
>>> find_library("AntTweakBar")
>>>
why can't ctype find the dll?
Upvotes: 0
Views: 2876
Reputation: 14854
there are 2 t's in the file name
antweakbar.dll
- name given by you
AntTweakBar.dll
- actual file name
C:\\Windows\\System32\\antweakbar.dll
should be C:\\Windows\\System32\\anttweakbar.dll
for example (checking with inetcfg.dll, as i don't have anttweakbar.dll), see below for Python 2.7.2
In [136]: import os
In [137]: os.path.exists("C:\\Windows\\System32\\inetcfg.dll")
Out[137]: True
Upvotes: 1