Joey Geralnik added the comment:
Forget other filelike objects. The FileInput class only works with actual
files, so the readlines function should always return at least as many bytes as
its first parameter. Is this assumption wrong?
--
___
Python
Joey Geralnik added the comment:
But this is calling the readlines function, which continually reads from the
file until more bytes have been read than the specified argument.
>From bz2.readlines:
"size can be specified to control the number of lines read: no further lines
will be r
Joey Geralnik added the comment:
First off, I'm a complete noob looking at the python source code for the first
time so forgive me if I've done something wrong.
What if the length of the chunk is checked as well? The following code works
fine:
import sys
while True: