Iteration on file reading

Paul Watson pwatson at redlinec.com
Thu Oct 2 18:42:54 EDT 2003


    for line in sys.stdin:

Does this statement cause all of stdin to be read before the loop begins?

I may need to read several GB and I do not want to swamp the machine's
memory.






More information about the Python-list mailing list