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

bundles / IPython 9.11.0 / IPython / utils / PyColorize / Parser / format2

function

IPython.utils.PyColorize:Parser.format2

source: /IPython/utils/PyColorize.py :445

Signature

def   format2 ( self raw : str out : Any = None )  →  tuple[str | None, bool]

Summary

Parse and send the colored source.

Extended Summary

If out is not specified, the defaults (given to constructor) are used.

out should be a file-type object. Optionally, out can be given as the string 'str' and the parser will automatically return the output in a string.

Aliases

  • IPython.core.ultratb.Parser.format2