On Fri, Feb 5, 2010 at 10:28 PM, Antoine Pitrou <solip...@pitrou.net> wrote: > Pascal Chambon <pythoniks <at> gmail.com> writes: >> >> By the way, I'm having trouble with the "name" attribute of raw files, >> which can be string or integer (confusing), ambiguous if containing a >> relative path, and which isn't able to handle the new case of my >> library, i.e opening a file from an existing file handle (which is ALSO >> an integer, like C file descriptors...) > > What is the difference between "file handle" and a regular C file descriptor? > Is it some Windows-specific thing? > If so, then perhaps it deserves some Windows-specific attribute ("handle"?).
When wondering about the same issue, I found the following useful: http://www.codeproject.com/KB/files/handles.aspx The C library file descriptor as returned by C open is emulated by win32. Only HANDLE is considered "native" (can be passed freely however you want within one process). cheers, David _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com