IOStream

IOStream()
A protocol for input/output streams.

Static Methods

get_default

get_default() -> IOStreamProtocol | AsyncIOStreamProtocol
Get the default input/output stream.
Returns:
IOStream: The default input/output stream.
Returns:
TypeDescription
IOStreamProtocol | AsyncIOStreamProtocolIOStream: The default input/output stream.

get_global_default

get_global_default() -> IOStreamProtocol | AsyncIOStreamProtocol
Get the default input/output stream.
Returns:
IOStream: The default input/output stream.
Returns:
TypeDescription
IOStreamProtocol | AsyncIOStreamProtocolIOStream: The default input/output stream.

set_default

set_default(stream: IOStreamProtocol | AsyncIOStreamProtocol | None) -> Iterator[None]
Set the default input/output stream.
Parameters:
NameDescription
streamThe input/output stream to set as the default.

Type: IOStreamProtocol | AsyncIOStreamProtocol | None

set_global_default

set_global_default(stream: IOStreamProtocol | AsyncIOStreamProtocol) -> None
Set the default input/output stream.
Parameters:
NameDescription
streamThe input/output stream to set as the default.

Type: IOStreamProtocol | AsyncIOStreamProtocol