parameters: ()
return_statement: return _strip_prompts(prompt_re, turnoff_re=turnoff_re)
docstring: Strip IPython's In [1]:/...: prompts.
docstring_summary: Strip IPython's In [1]:/...: prompts.
docstring_tokens: Strip IPython s In [ 1 ] : / ... : prompts .
function: def ipy_prompt():
      """Strip IPython's In [1]:/...: prompts."""
      # FIXME: non-capturing version (?:...) usable?
      prompt_re = re.compile(r'^(In \[\d+\]: |\s*\.{3,}: ?)')
      # Disable prompt stripping inside cell magics
      turnoff_re = re.compile(r'^%%')
      return _strip_prompts(prompt_re, turnoff_re=turnoff_re)
function_tokens: def ipy_prompt ( ) : # FIXME: non-capturing version (?:...) usable? prompt_re = re . compile ( r'^(In \[\d+\]: |\s*\.{3,}: ?)' ) # Disable prompt stripping inside cell magics turnoff_re = re . compile ( r'^%%' ) return _strip_prompts ( prompt_re , turnoff_re = turnoff_re )