Split python and c part into 2 files