(self, line: str | bytes, **markup: bool)
| 532 | self._tw.flush() |
| 533 | |
| 534 | def write_line(self, line: str | bytes, **markup: bool) -> None: |
| 535 | if not isinstance(line, str): |
| 536 | line = str(line, errors="replace") |
| 537 | self.ensure_newline() |
| 538 | self._tw.line(line, **markup) |
| 539 | |
| 540 | def rewrite(self, line: str, **markup: bool) -> None: |
| 541 | """Rewinds the terminal cursor to the beginning and writes the given line. |