[Python-Dev] Windows IO

"Martin v. Löwis" martin@v.loewis.de
Mon, 17 Mar 2003 23:08:31 +0100


James C. Ahlstrom wrote:
> AFAIK, all Python IO uses the fprintf() functions of Windows.  These
> stream IO functions are Posix emulations, are not the native
> Windows IO functions, and are second class citizens.  The native
> Windows IO functions are CreateFile(), ReadFile(), WriteFile() etc.
> The native Windows functions support additional functionality.

This isn't really the case. fprintf is not (primarily) defined in
POSIX, but in standard C, and it is part of the standard C library
that comes with the C compiler. It is true that fprintf is not a system
call on Windows, but neither is it a system call on Unix (the system
call on Unix is write(2)).

Regards,
Martin