Map the file into RAM by using the mmap module. The file's contents than is availabel as a seachable string.
HTH, Gerald
Robin Becker schrieb:
Is there any way to get regexes to work on non-string/unicode objects. I would like to split large files by regex and it seems relatively hard to do so without having the whole file in memory. Even with buffers it seems hard to get regexes to indicate that they failed because of buffer termination and getting a partial match to be resumable seems out of the question.
What interface does re actually need for its src objects?
-- GPG-Key: http://keyserver.veridis.com:11371/search?q=0xA140D634
-- http://mail.python.org/mailman/listinfo/python-list