MCPcopy Create free account
hub / github.com/ipython/ipython / init_io

Method init_io

IPython/terminal/interactiveshell.py:490–505  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

488 stacklevel=2)
489
490 def init_io(self):
491 if sys.platform not in {'win32', 'cli'}:
492 return
493
494 import colorama
495 colorama.init()
496
497 # For some reason we make these wrappers around stdout/stderr.
498 # For now, we need to reset them so all output gets coloured.
499 # https://github.com/ipython/ipython/issues/8669
500 # io.std* are deprecated, but don't show our own deprecation warnings
501 # during initialization of the deprecated API.
502 with warnings.catch_warnings():
503 warnings.simplefilter('ignore', DeprecationWarning)
504 io.stdout = io.IOStream(sys.stdout)
505 io.stderr = io.IOStream(sys.stderr)
506
507 def init_magics(self):
508 super(TerminalInteractiveShell, self).init_magics()

Callers

nothing calls this directly

Calls 1

initMethod · 0.80

Tested by

no test coverage detected