Show More
@@ -524,15 +524,31 b' class IPythonInputSplitter(InputSplitter):' | |||
|
524 | 524 | self._buffer_raw[:] = [] |
|
525 | 525 | self.source_raw = '' |
|
526 | 526 | self.transformer_accumulating = False |
|
527 | for t in self.transforms: | |
|
528 | t.reset() | |
|
529 | ||
|
530 | def flush_transformers(self): | |
|
531 | out = None | |
|
532 | for t in self.transforms: | |
|
533 | tmp = t.reset() | |
|
534 | if tmp: | |
|
535 | out = tmp | |
|
536 | if out: | |
|
537 | self._store(out) | |
|
527 | 538 | |
|
528 | 539 | def source_raw_reset(self): |
|
529 | 540 | """Return input and raw source and perform a full reset. |
|
530 | 541 | """ |
|
542 | self.flush_transformers() | |
|
531 | 543 | out = self.source |
|
532 | 544 | out_r = self.source_raw |
|
533 | 545 | self.reset() |
|
534 | 546 | return out, out_r |
|
535 | 547 | |
|
548 | def source_reset(self): | |
|
549 | self.flush_transformers() | |
|
550 | return super(IPythonInputSplitter, self).source_reset() | |
|
551 | ||
|
536 | 552 | def push_accepts_more(self): |
|
537 | 553 | if self.transformer_accumulating: |
|
538 | 554 | return True |
General Comments 0
You need to be logged in to leave comments.
Login now