A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://ipython.readthedocs.io/en/latest/api/generated/IPython.utils.capture.html below:

Website Navigation


utils.capture — IPython 9.5.0.dev documentation

Important

This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.

If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).

Module: utils.capture

IO capturing utilities.

3 Classes
class IPython.utils.capture.RichOutput(data=None, metadata=None, transient=None, update=False)

Bases: object

__init__(data=None, metadata=None, transient=None, update=False)
class IPython.utils.capture.CapturedIO(stdout, stderr, outputs=None)

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().

__init__(stdout, stderr, outputs=None)
property outputs

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)
show()

write my output to sys.stdout/err as appropriate

property stderr

Captured standard error

property stdout

Captured standard output

class IPython.utils.capture.capture_output(stdout=True, stderr=True, display=True)

Bases: object

context manager for capturing stdout/err

__init__(stdout=True, stderr=True, display=True)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4