Module io

Module io 

Source
Expand description

File I/O utilities for CLI tools

Provides helpers for reading from stdin/file and writing to stdout/file, which is a common pattern in CLI tools that support piping.

Functions§

read_input
Read input from stdin (if path is “-”) or from a file
write_output
Write output to stdout (if path is None or “-”) or to a file
write_stderr
Write output to stderr