c functions for python