Framework for Python

Workflow

capture_output()

Capture everything printed to stdout and stderr inside the block.

::

with fw.capture_output() as captured:
    model.summary()
captured.lines

Usage

capture_output() -> Iterator[CapturedOutput]

Details

Exceptions are not caught: the output printed before one is still available in captured.output.