Show More
@@ -418,12 +418,6 b' def _strip_prompts(prompt_re, initial_re=None, turnoff_re=None):' | |||||
418 | If any prompt is found on the first two lines, |
|
418 | If any prompt is found on the first two lines, | |
419 | prompts will be stripped from the rest of the block. |
|
419 | prompts will be stripped from the rest of the block. | |
420 | """ |
|
420 | """ | |
421 | def pass_thru(line1): |
|
|||
422 | "Pass lines through unaltered until the end of the cell" |
|
|||
423 | line = line1 |
|
|||
424 | while line is not None: |
|
|||
425 | line = (yield line) |
|
|||
426 |
|
||||
427 | if initial_re is None: |
|
421 | if initial_re is None: | |
428 | initial_re = prompt_re |
|
422 | initial_re = prompt_re | |
429 | line = '' |
|
423 | line = '' | |
@@ -438,8 +432,8 b' def _strip_prompts(prompt_re, initial_re=None, turnoff_re=None):' | |||||
438 | if turnoff_re.match(line): |
|
432 | if turnoff_re.match(line): | |
439 | # We're in e.g. a cell magic; disable this transformer for |
|
433 | # We're in e.g. a cell magic; disable this transformer for | |
440 | # the rest of the cell. |
|
434 | # the rest of the cell. | |
441 | yield from pass_thru(line) |
|
435 | while line is not None: | |
442 |
line = |
|
436 | line = (yield line) | |
443 | continue |
|
437 | continue | |
444 |
|
438 | |||
445 | line = (yield out) |
|
439 | line = (yield out) | |
@@ -460,8 +454,8 b' def _strip_prompts(prompt_re, initial_re=None, turnoff_re=None):' | |||||
460 |
|
454 | |||
461 | else: |
|
455 | else: | |
462 | # Prompts not in input - wait for reset |
|
456 | # Prompts not in input - wait for reset | |
463 | yield from pass_thru(line) |
|
457 | while line is not None: | |
464 |
line = |
|
458 | line = (yield line) | |
465 |
|
459 | |||
466 | @CoroutineInputTransformer.wrap |
|
460 | @CoroutineInputTransformer.wrap | |
467 | def classic_prompt(): |
|
461 | def classic_prompt(): |
General Comments 0
You need to be logged in to leave comments.
Login now