Is ctypes appropriate in my case?

Terry Reedy tjreedy at udel.edu
Wed Oct 29 14:51:23 EDT 2008


dudeja.rajat at gmail.com wrote:
> Hi,
> 
> I've a dll and its header file that controls an hardware. I want to 
> write a wrapper for this dll in Python.
> What is the best way that I can write a wrapper?

What do you want to do with the wrapper?

> I know ctypes modules and have used it before. As far as I know ctypes 
> is only used to call the dll functions in a python module.

I am not sure what you mean here.  Python code can directly import and 
call functions in dlls that represent Python extension modules and that 
are placed in the Pythonxx/dlls directory in your Windows Python 
installation.  Ctypes is mostly used to call functions in a dll that is 
*not* a python extension module, that was not written for Python.




More information about the Python-list mailing list