{ } Raw JSON

bundles / IPython 9.17.0 / IPython / utils / capture / CapturedIO

class

IPython.utils.capture:CapturedIO

source: /dev/ipython/IPython/utils/capture.py:64

Signature

class CapturedIO(stdout: StringIO | None, stderr: StringIO | None, outputs: list[Any] | None = None)

Members

Summary

Simple object for containing captured stdout/err and rich display StringIO objects

Extended Summary

Each instance c has three attributes:

  • c.stdoutstandard output as a string

  • c.stderrstandard error as a string

  • c.outputs: a list of rich display outputs

Additionally, there's a c.show() method which will print all of the above in the same order, and can be invoked simply via c().

Aliases

  • IPython.utils.capture.CapturedIO