Passing FILE * types using ctypes

Zeeshan Quireshi zeeshan.quireshi at gmail.com
Thu Mar 4 00:50:19 CET 2010


Hello, I'm using ctypes to wrap a library i wrote. I am trying to pass
it a FILE *pointer, how do i open a file in Python and convert it to a
FILE *pointer. Or do i have to call the C library using ctypes first,
get the pointer and then pass it to my function.

Also, is there any automated way to convert c struct and enum
definitions to ctypes data types.

Zeeshan



More information about the Python-list mailing list