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

bundles / IPython latest / IPython / utils / PyColorize / Parser / format2

function

IPython.utils.PyColorize:Parser.format2

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

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