simultaneous reading and writing a textfile

Mark Wilkinson m.wilkinson at tideway.com
Wed May 17 04:33:01 EDT 2006


Why this:

> lines = iter(infile.readline, "")
> # copy one line at a time
> for line in lines:

Rather than this?

> for line in infile:


..Mark
This email and any attachment may contain confidential, privileged information for the sole use of the intended recipient. If you are not the intended recipient, do not disclose, reproduce, disseminate or otherwise use this communication. If you received this communication in error, please immediately notify the sender via email and delete the communication from your system.



More information about the Python-list mailing list