SWIG vs Pyrex vs Cython -- a quicky question

Martin Pool mbp at canonical.com
Mon Sep 21 09:54:16 BST 2009


2009/9/21 Russel Winder <russel.winder at concertant.com>:
> Not an on-topic question I guess, but the audience here is likely
> knowledgable on this topic, so makes a great sample.
>
> For calling C functions from Python test code, to unit test the C code,
> is it better to use SWIG or Pyrex or Cython?  ctypes is not a candidate
> I think as this is not connecting to a library, shared object or DLL.

You can't compile it into a shared library and use ctypes?  That's
probably what I would try first.

Otherwise I'd use Cython.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list