Called by Python (not tkinter?) when stdout or stderr wants to write :param txt: text of output :type txt: (str)
(self, txt)
| 4033 | Window._restore_stderr() |
| 4034 | |
| 4035 | def write(self, txt): |
| 4036 | """ |
| 4037 | Called by Python (not tkinter?) when stdout or stderr wants to write |
| 4038 | |
| 4039 | :param txt: text of output |
| 4040 | :type txt: (str) |
| 4041 | """ |
| 4042 | self.update(txt, append=True) |
| 4043 | # if need to echo, then send the same text to the saved stdout and stderr |
| 4044 | if self.echo_stdout_stderr: |
| 4045 | if Window._original_stdout is not None: |
| 4046 | Window._original_stdout.write(txt) |
| 4047 | elif Window._original_stderr is not None: |
| 4048 | Window._original_stderr.write(txt) |
| 4049 | |
| 4050 | def flush(self): |
| 4051 | """ |
no test coverage detected