How to receive a FILE* from Python under MinGW?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Mar 23 20:37:17 CET 2007


En Fri, 23 Mar 2007 16:34:22 -0300, Gabriel Genellina  
<gagsl-py2 at yahoo.com.ar> escribió:

>> What about calling mscvrt_get_osfhandle from inside the SWIG wrapper?
>> I tried this but it seemed that the function was not exported to the
>> DLL.
>
> The idea is to separate both worlds - _get_osfhandle must be called from  
> the C runtime used by Python, not the one linked to your extension.

Ah, but you could import the msvcrt module and get it from there. *ONLY*  
get_osfhandle. The other function, open_osfhandle, must be from the  
runtime used by your extension.

-- 
Gabriel Genellina




More information about the Python-list mailing list