Am Sonntag 14 Mai 2006 20:51 schrieb Andrew Robert: > def getblocks(f, blocksize=1024): > while True: > s = f.read(blocksize) > if not s: return > yield s
This won't work. The following will: def getblocks(f,blocksize=1024): while True: s = f.read(blocksize) if not s: break yield s --- Heiko. -- http://mail.python.org/mailman/listinfo/python-list