Ricardo Aráoz <[EMAIL PROTECTED]> writes: > The easy/simple (too easy/simple?) way I see out of it is to read THE > WHOLE file into memory and don't worry. But what if the file is too
The easiest and simplest approach is often the best with Python. Reading in the whole file is rarely too heavy, and you omit the python "object overhead" entirely - all the code executes in the fast C extensions. If the file is too big, you might want to look up mmap: http://effbot.org/librarybook/mmap.htm -- http://mail.python.org/mailman/listinfo/python-list