Return (height, width) where height and width are the height and width of the terminal window in characters.
(self)
| 386 | self._hide_cursor() |
| 387 | |
| 388 | def getheightwidth(self) -> tuple[int, int]: |
| 389 | """Return (height, width) where height and width are the height |
| 390 | and width of the terminal window in characters.""" |
| 391 | info = CONSOLE_SCREEN_BUFFER_INFO() |
| 392 | if not GetConsoleScreenBufferInfo(OutHandle, info): |
| 393 | raise WinError(get_last_error()) |
| 394 | return ( |
| 395 | info.srWindow.Bottom - info.srWindow.Top + 1, |
| 396 | info.srWindow.Right - info.srWindow.Left + 1, |
| 397 | ) |
| 398 | |
| 399 | def _getscrollbacksize(self) -> int: |
| 400 | info = CONSOLE_SCREEN_BUFFER_INFO() |
no test coverage detected