Show More
@@ -381,13 +381,15 b' def _strip_prompts(prompt_re):' | |||
|
381 | 381 | @CoroutineInputTransformer.wrap |
|
382 | 382 | def classic_prompt(): |
|
383 | 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 | 386 | return _strip_prompts(prompt_re) |
|
386 | 387 | |
|
387 | 388 | @CoroutineInputTransformer.wrap |
|
388 | 389 | def ipy_prompt(): |
|
389 | 390 | """Strip IPython's In [1]:/...: prompts.""" |
|
390 | prompt_re = re.compile(r'^(In \[\d+\]: |^\ \ \ \.\.\.+: )') | |
|
391 | # FIXME: non-capturing version (?:...) usable? | |
|
392 | prompt_re = re.compile(r'^(In \[\d+\]: |\ \ \ \.\.\.+: )') | |
|
391 | 393 | return _strip_prompts(prompt_re) |
|
392 | 394 | |
|
393 | 395 |
General Comments 0
You need to be logged in to leave comments.
Login now