Thursday, June 27, 2013

Ctypes in Python

I was looking for a way to bind proprietary runtime dll to python or java. Doing it with java will only produce more code and make it complicated. After searching in google, I found this slide
http://www.slideshare.net/standel/python-bindings-overview
This made me decide to use Ctypes.

I've read the tutorial from this 
and it got me coding fast. What I really found difficult was knowing if the dll was using WINAPI or STDAPI. The dll did not come with a good documentation. Good thing Ctypes can detect the type and throws error.