Writing python C extensions using CPython and SWIG.