I am using ctypes to wrap a C-library (which I have control over) with Python. I want to wrap a C-function with declaration:
int fread_int( FILE * stream );
fileH = open( file , "r")
value = ctypes_function_fread_int( ????? )
I've encountered the same problem.
Take a look at this file:
You can use PyFile_AsFile from it.