read(size=-1)
Read and return up to size bytes. If the argument is omitted, None
, or negative, data is read and returned until EOF is reached. An empty bytes
object is returned if the stream is already at EOF.
If the argument is positive, and the underlying raw stream is not interactive, multiple raw reads may be issued to satisfy the byte count (unless EOF is reached first). But for interactive raw streams, at most one raw read will be issued, and a short result does not imply that EOF is imminent.
A BlockingIOError
is raised if the underlying raw stream is in non blocking-mode, and has no data available at the moment.
Please login to continue.