Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).
IO capturing utilities.
Bases: object
Bases: object
Simple object for containing captured stdout/err and rich display StringIO objects
Each instance c has three attributes:
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().
A list of the captured rich display outputs, if any.
If you have a CapturedIO object c, these can be displayed in IPython using:
from IPython.display import display
for o in c.outputs:
display(o)
write my output to sys.stdout/err as appropriate
Captured standard error
Captured standard output