This is a development version (9.14.0.dev) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.14.0.dev / IPython / core / interactiveshell / InteractiveShell / _tee

function

IPython.core.interactiveshell:InteractiveShell._tee

source: /IPython/core/interactiveshell.py :3086

Signature

def   _tee ( self channel : Literal['stdout', 'stderr'] )

Summary

Capture output of a given standard stream and store it in history.

Extended Summary

Uses patching of write method for maximal compatibility, because ipykernel checks for instances of the stream class, and stream classes in ipykernel implement more complex logic.

Aliases

  • IPython.InteractiveShell._tee