stouputils.parallel.capturer module#
- class PipeWriter(conn: Any, encoding: str, errors: str)[source]#
Bases:
objectA writer that sends data to a multiprocessing Connection.
- class CaptureOutput(
- encoding: str = 'utf-8',
- errors: str = 'replace',
- chunk_size: int = 1024,
Bases:
objectUtility to capture stdout/stderr from a subprocess and relay it to the parent’s stdout.
The class creates an os.pipe(), marks fds as inheritable (for spawn method), provides methods to start a listener thread that reads from the pipe and writes to the main process’s sys.stdout/sys.stderr, and to close/join the listener.
- parent_close_write() None[source]#
Close the parent’s copy of the write end; the child’s copy remains.