Implementing file reading in C/Python

Hrvoje Niksic hniksic at
Mon Jan 12 14:31:26 CET 2009

sturlamolden <sturlamolden at> writes:

> On Jan 9, 6:41 pm, Sion Arrowsmith <si... at>
> wrote:
>> You've snipped the bit further on in that sentence where the OP
>> says that the file of interest is 2GB. Do you still want to try
>> mmap'ing it?
> Python's mmap object does not take an offset parameter. If it did, one
> could mmap smaller portions of the file.

As of 2.6 it does, but that might not be of much use if you're using
2.5.x or earlier.  If you speak Python/C and really need offset, you
could backport the mmap module from 2.6 and compile it under a
different name for 2.5.

More information about the Python-list mailing list