Robert Kern <robert.k...@gmail.com> writes: > f = gzip.open('filename.gz') > for line in f: > print line
or use f.read(nbytes) to read n uncompressed bytes from f. Note that the standard iterator (which iterates over lines) can potentially consume an unbounded amount of memory if the file contains no newlines. -- http://mail.python.org/mailman/listinfo/python-list