def get_pointer(ctypes_func):
 return ctypes.cast(ctypes_func, ctypes.c_void_p).value

def get_pointer ( ctypes_func ) : return ctypes . cast ( ctypes_func , ctypes . c_void_p ) . value
get a pointer to the underlying function for a ctypes function as an integer .