Jim Garrison <jgarrison at troux.com> writes: > buf = f.read(10000) > while len(buf) > 0 > # do something.... > buf = f.read(10000) I think it's more usual to use a 'break' rather than duplicate the read. That is, something more like while True: buf = f.read(10000) if len(buf) == 0: break # do something -M-