On Mon, 2005-01-03 at 11:46 -0300, Batista, Facundo wrote: > - Used file instead of open, to don't read the whole file in memory.
[EMAIL PROTECTED] ~]$ python Python 2.3.4 (#1, Oct 26 2004, 16:42:40) .>>> file is open True .>>> print repr(file), repr(open) <type 'file'> <type 'file'> I'd be interested if you could clarify what you mean there. As far as I know, the whole file will only be read into memory if you use file.read () or file.readlines(). If you use an iterator it does internal readahead, but won't read the lot at once. If you use read() it reads only what you say. -- Craig Ringer -- http://mail.python.org/mailman/listinfo/python-list