Passing FILE * types using ctypes

Robert Kern robert.kern at gmail.com
Wed Mar 10 17:09:26 EST 2010


On 2010-03-10 15:57 PM, Lawrence D'Oliveiro wrote:
> In message<7vbrveFegeU1 at mid.individual.net>, Gregory Ewing wrote:
>
>> If you need the same FILE * that Python is using, you
>> may need to use ctypes to extract it out of the file
>> object.
>
> Why would Python be using a FILE *?

In Python 2.x, Python's file objects use a stdio FILE* pointer underneath. The 
I/O subsystem was rewritten in Python 3.x to use only file descriptors.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list