From: Lawrence D'Oliveiro on 10 Mar 2010 16:57 In message <7vbrveFegeU1(a)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 *?
From: Lawrence D'Oliveiro on 10 Mar 2010 16:58 In message <a83319d7-c199-4532-9816- d002f7fd7914(a)q16g2000yqq.googlegroups.com>, Zeeshan Quireshi wrote: > Hello, I'm using ctypes to wrap a library i wrote. I am trying to pass > it a FILE *pointer ... Another option is to fix your library not to use stdio directly.
From: Robert Kern on 10 Mar 2010 17:09 On 2010-03-10 15:57 PM, Lawrence D'Oliveiro wrote: > In message<7vbrveFegeU1(a)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
First
|
Prev
|
Pages: 1 2 Prev: DOS Follies (Was: Docstrings...) Next: Failure in test_hashlib.py and test_hmac.py |