0

Python ctype が AntTweakBar.dll を見つけられない?? ファイルはpython OSファイルシステムコールには存在しませんが、c:\Windows\System32ディレクトリに存在します。

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")
>>>

ctype で dll が見つからないのはなぜですか?

4

1 に答える 1

1

ファイル名に 2 つの t があります

antweakbar.dll- あなたが付けた名前

AntTweakBar.dll- 実際のファイル名

C:\\Windows\\System32\\antweakbar.dll する必要がありますC:\\Windows\\System32\\anttweakbar.dll

たとえば(私はanttweakbar.dllを持っていないので、inetcfg.dllでチェックします)、Python 2.7.2については以下を参照してください

In [136]: import os

In [137]: os.path.exists("C:\\Windows\\System32\\inetcfg.dll")
Out[137]: True
于 2012-08-01T05:07:14.050 に答える