FILE object in Python3.0 extension modules

Benjamin Peterson benjamin at python.org
Fri May 29 07:48:26 EDT 2009


Joachim Dahl <dahl.joachim <at> gmail.com> writes:
> 
> 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.

You use PyObject_IsInstance to test if the object is an instance of io.IOBase.







More information about the Python-list mailing list