How to write a Python module in C