[Python-Dev] mmapfile module
Andrew M. Kuchling
Tue, 28 Mar 2000 15:50:18 -0500 (EST)
Fredrik Lundh writes:
>(And how come the Windows implementation doesn't support
>read-only vs. read/write flags?)
Good point; that should be fixed.
> (filename, mode="rb", size=entire file, offset=0)
>be sufficient? (where mode can be "wb" or "wb+" or "rb+",
>optionally without the "b")
Hmm... maybe we can dispose of the PROT_* argument that way on Unix.
But how would you specify MAP_SHARED vs. MAP_PRIVATE, or
MAP_ANONYMOUS? (MAP_FIXED seems useless to a Python programmer.)
Another character in the mode argument, or a flags argument?
Worse, as you pointed out in the same thread, MAP_ANONYMOUS on OSF/1
doesn't want to take a file descriptor at all.
Also, the tag name on Windows seems important, from Gordon McMillan's
explanation of it:
A.M. Kuchling http://starship.python.net/crew/amk/
You mustn't kill me. You don't love me. You d-don't even know me.
-- The Furies kill Abel, in SANDMAN #66: "The Kindly Ones:10"