input record seperator (equivalent of "$|" of perl)

Fredrik Lundh fredrik at
Mon Dec 20 01:31:33 CET 2004

"M.E.Farmer" wrote:

> What about a generator and xreadlines for those really large files:

when you loop over a file object, Python uses a generator and a xreadlines-
style buffering system to read data as you go.  (if you check the on-line help,
you'll notice that xreadlines itself is only provided for compatibility reasons).

or in other words, the examples I posted a couple of hours ago uses no more
memory than your version.


More information about the Python-list mailing list