def read_chunks(file, size=io.DEFAULT_BUFFER_SIZE):
while True:<EOL><INDENT>chunk = file.read(size)<EOL>if not chunk:<EOL><INDENT>break<EOL><DEDENT>yield chunk<EOL><DEDENT>
Yield pieces of data from a file-like object until EOF.