In Python2.x, I used PyFile_Check(obj) to check if a parameter was a file object.
Now, in Python3.0 the same object (obtained as open('file.bin','wb')) is an io.BufferedWriter object. How do I perform type checking for such an object in the extension module, and how do I extract a FILE * object from it? I browsed the C API documentation, but couldn't find an answer. The purpose is to dump the contents of a Python extension type to disk as binary data using C's fwrite() function. -- http://mail.python.org/mailman/listinfo/python-list