Perhaps better to use readexactly(N), which raises EOF instead of returning
fewer than N bytes if it hits EOF early.

On Fri, Jul 31, 2015 at 5:02 PM, Victor Stinner <[email protected]>
wrote:

> 2015-07-31 6:56 GMT+02:00 Luciano Ramalho <[email protected]>:
> > It seems to me you can't use .read() with no arguments to read data
> > that is not line-oriented and is not the whole transmission either.
> > You must use .read(N), where N is a number of bytes. Then you parse
> > what you get and decide on a suitable value of N for the next read.
> > Rinse and repeat.
>
> Exactly.
>
> Victor
>



-- 
--Guido van Rossum (python.org/~guido)

Reply via email to