[python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()
Scott Leerssen
sleerssen at gmail.com
Mon Dec 19 22:34:42 CET 2011
On Dec 19, 2011, at 4:32 PM, Mark Hammond wrote:
> On 18/12/2011 4:34 AM, Scott Leerssen wrote:
>>
>> On Dec 17, 2011, at 12:25 PM, Amaury Forgeot d'Arc wrote:
>>
>>> 2011/12/17 Scott Leerssen <sleerssen at gmail.com
>>> <mailto:sleerssen at gmail.com>>
>>>
>>> I did see that, but I interpreted that to mean that the PyHANDLE
>>> would be dereferenced from the underlying Windows file handle,
>>>
>>>
>>> It's the other way round: the PyHandle just forgets the win32 handle
>>> value, and will not close it in its __del__.
>>
>> Sorry, I did write that backward. How is the win32 handle freed?
>
> The .Detach() method returns an integer handle value which can then be closed using win32api.CloseHandle().
>
Excellent! Thanks!
More information about the python-win32
mailing list