PyDocs

Nav

Networking and Interprocess Communication

StreamReader.readline

asyncio

async method of StreamReader (source) not WASI
  • StreamReader.readline()
Read chunk of data from the stream until newline (b'\n') is found.

On success, return chunk that ends with newline.  If only partial
line can be read due to EOF, return incomplete line without
terminating newline.  When EOF was reached while no bytes read,
empty bytes object is returned.

If limit is reached, ValueError will be raised.  In that case, if
newline was found, complete line including newline will be removed
from internal buffer.  Else, internal buffer will be cleared.
Limit is compared against part of the line without newline.

If stream was paused, this function will automatically resume it if
needed.
0 Examples
No examples for asyncio/StreamReader.readline.
See Also
No see-alsos for asyncio/StreamReader.readline
0 Notes
No notes for StreamReader.readline