use SWIG to make a functional (but ugly) python wrapper