io.StdCaptureFD API [rev. 38799]

class StdCaptureFD(Capture):

This class allows to capture writes to FD1 and FD2 and may connect a NULL file to FD0 (and prevent reads from sys.stdin)

methods:

def __init__(self, out=True, err=True, mixed=False, in_=True, patchsys=True):

*no docstring available*

def call(cls, func, *args, **kwargs):

return a (res, out, err) tuple where out and err represent the output/error output during function execution. call the given function with args/kwargs and capture output/error during its execution.

def done(self):

return (outfile, errfile) and stop capturing.

def reset(self):

reset sys.stdout and sys.stderr returns a tuple of file objects (out, err) for the captured data