bundles / IPython 9.2.0 / IPython / core / magics / execution / ExecutionMagics / capture
function
IPython.core.magics.execution:ExecutionMagics.capture
Signature
def capture(self, line, cell)Summary
[1;34m::
Extended Summary
%[0m[1;35mcapture[0m [[36m--no-stderr[0m] [[36m--no-stdout[0m] [[36m--no-display[0m] [32m[output][0m
run the cell, capturing stdout, stderr, and IPython's rich display() calls.
[1;34mpositional arguments:[0m
output The name of the variable in which to store output. This is a
utils.io.CapturedIOobject withstdout/err attributes for the text of the captured output. CapturedOutput also has a
show()method for displaying the output, and__call__as well, so you can use that to quickly display the output. If unspecified, captured output is discarded.
[1;34moptions:[0m
--no-stderr Don't capture stderr. --no-stdout Don't capture stdout. --no-display Don't capture IPython's rich display.
Aliases
IPython.core.magics.ExecutionMagics.capture