Luis Zarrabeitia wrote:
On Tuesday 17 March 2009 06:04:36 pm Jim Garrison wrote: with open(filename, "rb") as f: for buf in iter(lambda: f.read(1000),''): do_something(buff)
This is the most pythonic solution yet. Thanks to all the responders who took time to ponder this seemingly trivial question. I learned a lot about the Python mind-set. -- http://mail.python.org/mailman/listinfo/python-list