[Python-Dev] Add sendfile() to core?
tjreedy at udel.edu
Mon Jan 10 01:23:40 CET 2011
On 1/8/2011 2:55 AM, max ulidtko wrote:
> On Wed, 20 Mar 2002 14:53:58 -0500, Andrew Kuchling wrote:
> | sendfile() is used when writing really high-performance Web servers,
> | in order to save an unnecessary memory-to-memory copy. Question:
> | should I make up a patch to add a sendfile() wrapper to Python?
There is no issue on the tracker and he apparently never did.
There is a general policy of lightly wrapping useful os calls in os.
Martin said this already in what was essentially a 'go ahead'.
Problems include os differences,
> The only difficulty I can see is the choice of name for the wrapper.
> IMO, using "sendfile" from Linux and FreeBSD is pretty much okay; but
> objections may arise.
>  http://mail.python.org/pipermail/python-dev/2002-March/021543.html
such as name differences (but I think *nix generally wins ;-),
and the need for 'someone' to write the patches for the appropriate
C-coded os files: posix, nt, os2, ce. Patch write makes initial decision
on ironing out differences.
The above was the second and last substantive answer to Andrew, as there
was nothing much more to say.
The tracker awaits ;-). Specify, if you can, whether you think the
windows TransmitFile or modern equivalent is sufficiently compatible
with the *nix sendfile to be wrapped with the same API or whether you
propose Availability: Unix only.
Terry Jan Reedy
More information about the Python-Dev