home ¦ Archives ¦ Atom ¦ RSS

Heller: ctypes

Thomas Heller's ctypes module for Python looks like a nice alternative to pre-processing wrappers like SWIG.

Mainly a thin layer on top of the OS facilities for loading dynamic libraries, with ctypes you don't have to go through the rigamarole of writing a specfication file, translating that file to glue code, and then building an extension.

The down side is that you don't get the signature checking safety net that glue code can provide. Ergo, it's much easier to shoot yourself in the foot, in a big way.

© Brian M. Dennis. Built using Pelican. Theme by Giulio Fidente on github.