mxTools (was Re: why no "do : until"?)

A.M. Kuchling amk at mira.erols.com
Tue Jan 9 22:26:24 EST 2001


On Tue, 09 Jan 2001 16:16:36 -0800, Paul Prescod <paulp at ActiveState.com> wrote:
>I haven't tried this recently but if I remember correctly, the problem
>is: How would I do a regexp match on "Py..n" on a 1-gigabyte file with a
>fixed amount of "lookahead"? Do I have to load in chunks at a time and
>then do the pattern matching across "chunk boundaries" myself? If

With the mmapfile module, you should be able to mmap the entire
gigabyte file, and then do an re.search() on the whole thing.
Performance is then up to _sre and your OS's virtual memory
algorithms.

--amk




More information about the Python-list mailing list