PyDocs

Nav

Generic Operating System Services

BufferedIOBase

io

class (source)
Base class for buffered IO objects.

The main difference with RawIOBase is that the read() method
supports omitting the size argument, and does not have a default
implementation that defers to readinto().

In addition, read(), readinto() and write() may raise
BlockingIOError if the underlying raw stream is in non-blocking
mode and not ready; unlike their raw counterparts, they will never
return None.

A typical implementation should not inherit from a RawIOBase
implementation, but wrap one.
Members of BufferedIOBase

d

detach
Disconnect this buffer from its underlying raw stream and return it.

r

raw
The underlying raw stream (a RawIOBase instance) that BufferedIOBase deals with.
read
Read and return up to n bytes.
read1
Read and return up to size bytes, with at most one read() call to the underlying raw stream.
readinto
Read bytes into a pre-allocated, writable bytes-like object b and return the number of bytes read.
readinto1
Read bytes into a pre-allocated, writable bytes-like object b, using at most one call to the underlying raw stream’s read() (or readinto()) method.

w

write
Write buffer b to the IO stream.
0 Examples
No examples for io/BufferedIOBase.
See Also
No see-alsos for io/BufferedIOBase
0 Notes
No notes for BufferedIOBase