End capture mode and return captured string. Returns: str: Console output.
(self)
| 868 | self._enter_buffer() |
| 869 | |
| 870 | def end_capture(self) -> str: |
| 871 | """End capture mode and return captured string. |
| 872 | |
| 873 | Returns: |
| 874 | str: Console output. |
| 875 | """ |
| 876 | render_result = self._render_buffer(self._buffer) |
| 877 | del self._buffer[:] |
| 878 | self._exit_buffer() |
| 879 | return render_result |
| 880 | |
| 881 | def push_theme(self, theme: Theme, *, inherit: bool = True) -> None: |
| 882 | """Push a new theme on to the top of the stack, replacing the styles from the previous theme. |