PDA

View Full Version : How do I use a dll in Vizard


vizmaster
05-30-2008, 03:59 PM
I have a .dll file for reading some encoders. I tried simply importing with
import module.dll

I get the error dynamic module does not define init function. What is the proper method to handle a vendor .dll
:confused:

farshizzo
05-30-2008, 04:20 PM
Python is not capable of importing any DLL. The DLL must export specific functions for interfacing with Python. There is a 3rd party Python library called ctypes (http://python.net/crew/theller/ctypes/) which allows interfacing with any standard system DLL. I believe this will suit your needs.