Ich nutze Python 3.1 unter Win7 (64-bit). Ich erstelle folgendes Skript:
Code: Alles auswählen
import ctypes
f = ctypes.cdll.LoadLibrary("fib.dll")
print(f.fib(35))
Habe schon alles Mögliche probiert (z.B. Systempfade angepasst, Python neu installiert, etc.), leider ohne Erfolg.Traceback (most recent call last):
File "C:\...\ctypes.py", line 1, in <module>
import ctypes
File "C:\...\ctypes.py", line 2, in <module>
f = ctypes.cdll.LoadLibrary("fib.dll")
AttributeError: 'module' object has no attribute 'cdll'
Wenn ich allerdings im IDLE folgendes eingebe:
Code: Alles auswählen
>>> import ctypes
>>> print(ctypes.cdll)
<ctypes.LibraryLoader object at 0x027BDFB0>
Hat jemand eine Idee woran es liegen könnte?