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

Function classic_prompt

IPython/core/inputtransformer.py:456–463  ·  view source on GitHub ↗

Strip the >>>/... prompts of the Python interactive shell.

()

Source from the content-addressed store, hash-verified

454
455@CoroutineInputTransformer.wrap
456def classic_prompt():
457 """Strip the >>>/... prompts of the Python interactive shell."""
458 # FIXME: non-capturing version (?:...) usable?
459 prompt_re = re.compile(r'^(>>>|\.\.\.)( |$)')
460 initial_re = re.compile(r'^>>>( |$)')
461 # Any %magic/!system is IPython syntax, so we needn't look for >>> prompts
462 turnoff_re = re.compile(r'^[%!]')
463 return _strip_prompts(prompt_re, initial_re, turnoff_re)
464
465@CoroutineInputTransformer.wrap
466def ipy_prompt():

Callers 1

__init__Method · 0.90

Calls 1

_strip_promptsFunction · 0.85

Tested by

no test coverage detected