template for python extension in C