bundles / IPython 9.10.0 / IPython / core / magics / execution / ExecutionMagics / capture
function
IPython.core.magics.execution:ExecutionMagics.capture
Signature
def capture ( self , line , cell ) Summary
::
Extended Summary
%capture [--no-stderr] [--no-stdout] [--no-display] [output]
run the cell, capturing stdout, stderr, and IPython's rich display() calls.
positional arguments:
output The name of the variable in which to store output. This is a
utils.io.CapturedIOobject with stdout/err attributes for the text of the captured output. CapturedOutput also has ashow()method for displaying the output, and__call__as well, so you can use that toquickly display the output. If unspecified, captured output is discarded.
options:
--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