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

Function ipy_prompt

IPython/core/inputtransformer.py:466–472  ·  view source on GitHub ↗

Strip IPython's In [1]:/...: prompts.

()

Source from the content-addressed store, hash-verified

464
465@CoroutineInputTransformer.wrap
466def ipy_prompt():
467 """Strip IPython's In [1]:/...: prompts."""
468 # FIXME: non-capturing version (?:...) usable?
469 prompt_re = re.compile(r'^(In \[\d+\]: |\s*\.{3,}: ?)')
470 # Disable prompt stripping inside cell magics
471 turnoff_re = re.compile(r'^%%')
472 return _strip_prompts(prompt_re, turnoff_re=turnoff_re)
473
474
475@CoroutineInputTransformer.wrap

Callers 1

__init__Method · 0.90

Calls 1

_strip_promptsFunction · 0.85

Tested by

no test coverage detected