Python wrapper for c source code