For overriding stdout defaults
(self, s)
| 909 | # ^-- That's how simple this method was at first :( |
| 910 | |
| 911 | def write(self, s): |
| 912 | """For overriding stdout defaults""" |
| 913 | if "\x04" in s: |
| 914 | for block in s.split("\x04"): |
| 915 | self.write(block) |
| 916 | return |
| 917 | if s.rstrip() and "\x03" in s: |
| 918 | t = s.split("\x03")[1] |
| 919 | else: |
| 920 | t = s |
| 921 | |
| 922 | if not self.stdout_hist: |
| 923 | self.stdout_hist = t |
| 924 | else: |
| 925 | self.stdout_hist += t |
| 926 | |
| 927 | self.echo(s) |
| 928 | |
| 929 | def push(self, s, insert_into_history=True): |
| 930 | # Restore the original SIGINT handler. This is needed to be able |
no test coverage detected