[issue12939] Add new io.FileIO using the native Windows API
STINNER Victor
report at bugs.python.org
Wed Nov 2 13:54:23 CET 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
> Instead of rewriting your own RawIO implementation, why not use
> _open_osfhandle?
I don't know yet what is the best approach. One important point is to keep the
HANDLE, to be able to manipulate the open file using the Windows API (e.g. call
WriteFile instead of write).
I propose a RawIO to call directly the Windows API: file.write() would call
directly WriteFile() instead of the POSIX wrapper (write()).
We may use it to implement new features like async I/O on Windows (e.g.
WriteFileEx).
Modules/_multiprocessing/win32_functions.c exposes already some low-level
Windows functions like WriteFile(). We may reuse the RawIO to offer an object
oriented API for the Windows multiprocessing pipes. Such RawIO would have
extra methods, maybe a file.WriteFile() method to give access to extra options
like "overlapped".
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12939>
_______________________________________
More information about the Python-bugs-list
mailing list