##// END OF EJS Templates
Merge pull request #3495 from lebigot/master...
Thomas Kluyver -
r11253:fec2587f merge
parent child Browse files
Show More
@@ -381,13 +381,16 b' def _strip_prompts(prompt_re):'
381 @CoroutineInputTransformer.wrap
381 @CoroutineInputTransformer.wrap
382 def classic_prompt():
382 def classic_prompt():
383 """Strip the >>>/... prompts of the Python interactive shell."""
383 """Strip the >>>/... prompts of the Python interactive shell."""
384 prompt_re = re.compile(r'^(>>> ?|^\.\.\. ?)')
384 # FIXME: non-capturing version (?:...) usable?
385 prompt_re = re.compile(r'^(>>> ?|\.\.\. ?)')
385 return _strip_prompts(prompt_re)
386 return _strip_prompts(prompt_re)
386
387
387 @CoroutineInputTransformer.wrap
388 @CoroutineInputTransformer.wrap
388 def ipy_prompt():
389 def ipy_prompt():
389 """Strip IPython's In [1]:/...: prompts."""
390 """Strip IPython's In [1]:/...: prompts."""
390 prompt_re = re.compile(r'^(In \[\d+\]: |^\ \ \ \.\.\.+: )')
391 # FIXME: non-capturing version (?:...) usable?
392 # FIXME: r'^(In \[\d+\]: | {3}\.{3,}: )' clearer?
393 prompt_re = re.compile(r'^(In \[\d+\]: |\ \ \ \.\.\.+: )')
391 return _strip_prompts(prompt_re)
394 return _strip_prompts(prompt_re)
392
395
393
396
General Comments 0
You need to be logged in to leave comments. Login now