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

Fredrik Lundh fredrik at pythonware.com
Sun Dec 19 19:31:33 EST 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.

</F> 






More information about the Python-list mailing list