IO related utilities.
Term holds the file or file-like objects for handling I/O operations.
These are normally just sys.stdin, sys.stdout and sys.stderr but for Windows they can can replaced to allow editing the strings before they are displayed.
A class to duplicate an output stream to stdout/err.
This works in a manner very similar to the Unix ‘tee’ command.
When the object is closed or deleted, it closes the original file given to it for duplication.
Construct a new Tee object.
file_or_name : filename or open filehandle (writable)
mode : optional, valid mode for open().
channel : str, one of [‘stdout’, ‘stderr’]
Close the file and restore the channel.
Flush both channels.
Write data to both channels.
Simple object for containing captured stdout/err StringIO objects
write my output to sys.stdout/err as appropriate
Asks a question and returns a boolean (y/n) answer.
If default is given (one of ‘y’,’n’), it is used if the user input is empty. Otherwise the question is repeated until an answer is given.
An EOF is treated as the default answer. If there is no default, an exception is raised to prevent infinite loops.
Valid answers are: y/yes/n/no (match is not case sensitive).
Make a temporary python file, return filename and filehandle.
src : string or list of strings (no need for ending newlines if list)
ext : optional, string
(filename, open filehandle) :
Raw print to sys.__stdout__, otherwise identical interface to print().
Raw print to sys.__stderr__, otherwise identical interface to print().
Get a wrapper to write unicode to stdout/stderr as UTF-8.
This ignores environment variables and default encodings, to reliably write unicode to stdout or stderr.