FILE object in Python3.0 extension modules
dahl.joachim at gmail.com
Fri May 29 05:52:15 EDT 2009
In Python2.x, I used PyFile_Check(obj) to check if a parameter was a
Now, in Python3.0 the same object (obtained as open('file.bin','wb'))
How do I perform type checking for such an object in the extension
and how do I extract a FILE * object from it? I browsed the C API
couldn't find an answer.
The purpose is to dump the contents of a Python extension type to disk
binary data using C's fwrite() function.
More information about the Python-list