split large file by string/regex
Denis S. Otkidach
ods at strana.ru
Tue Nov 23 06:00:51 EST 2004
On Mon, 22 Nov 2004 20:48:16 +0100
Martin Dieringer <dieringe at zedat.fu-berlin.de> wrote:
> "Denis S. Otkidach" <ods at strana.ru> writes:
[...]
> > re module works fine with mmap-ed file, so no need to read it into
> > memory.
> >
>
> thank you, this is the solution!
> Now I can mmap.find all locations and then read the chunks them via
> file.seek and file.read
mmap-ed files also support subscription and slicing. I guess
mmfile[start:stop] would more readable.
--
Denis S. Otkidach
http://www.python.ru/ [ru]
More information about the Python-list
mailing list