Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False) Rendering is supported on Windows, Unix and Jupyter environments. For legacy Windows consoles, the win32 API is called directly. This method will also record what it renders if recording is
(self)
| 2042 | raise SystemExit(1) |
| 2043 | |
| 2044 | def _check_buffer(self) -> None: |
| 2045 | """Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False) |
| 2046 | Rendering is supported on Windows, Unix and Jupyter environments. For |
| 2047 | legacy Windows consoles, the win32 API is called directly. |
| 2048 | This method will also record what it renders if recording is enabled via Console.record. |
| 2049 | """ |
| 2050 | if self.quiet: |
| 2051 | del self._buffer[:] |
| 2052 | return |
| 2053 | |
| 2054 | try: |
| 2055 | self._write_buffer() |
| 2056 | except BrokenPipeError: |
| 2057 | self.on_broken_pipe() |
| 2058 | |
| 2059 | def _write_buffer(self) -> None: |
| 2060 | """Write the buffer to the output file.""" |
no test coverage detected