python foreign function interface