restype = ctypes.c_int
argtypes = [ctypes.c_int, ctypes.c_double]
functype = ctypes.CFUNCTYPE(restype, *argtypes)
wrapper = functype(address_of_static_function_as_an_int)
Can I use ctypes to call back C function from python embedded in C?