Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use ctypes with numpy.ctypeslib. The end results aren't as robust as 'real' python extensions (you have keep track of types yourself and write your own python wrappers), but it is much quicker and easier to get started. You don't have to learn anything about the python API, your C code remains 'pure' since it doesn't have to know anything about python and there is almost no boilerplate. For simple one off bindings to C functions it's great, especially if the data you're passing back and forth are numpy arrays.

There is also CFFI, which I haven't really used, but lots of people seem to like it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: