io
io.base
OutputStream
Print data to the output stream.
Arguments:
objects
any - The data to print.sep
str, optional - The separator between objects. Defaults to ” ”.end
str, optional - The end of the output. Defaults to ” ”.flush
bool, optional - Whether to flush the output. Defaults to False.
InputStream
input
Read a line from the input stream.
Arguments:
prompt
str, optional - The prompt to display. Defaults to "".password
bool, optional - Whether to read a password. Defaults to False.
Returns:
str
- The line read from the input stream.
IOStream
A protocol for input/output streams.
set_global_default
Set the default input/output stream.
Arguments:
stream
IOStream - The input/output stream to set as the default.
get_global_default
Get the default input/output stream.
Returns:
IOStream
- The default input/output stream.
get_default
Get the default input/output stream.
Returns:
IOStream
- The default input/output stream.
set_default
Set the default input/output stream.
Arguments:
stream
IOStream - The input/output stream to set as the default.