You are viewing an older version (9.12.0).Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.12.0 / IPython / utils / capture / CapturedIO

class

IPython.utils.capture:CapturedIO

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

Signature

class CapturedIO(stdout: StringIO, stderr: StringIO, outputs: Optional[List[Any]] = 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