Return (height, width) where height and width are the height and width of the terminal window in characters.
(self)
| 354 | self._hide_cursor() |
| 355 | |
| 356 | def getheightwidth(self) -> tuple[int, int]: |
| 357 | """Return (height, width) where height and width are the height |
| 358 | and width of the terminal window in characters.""" |
| 359 | info = CONSOLE_SCREEN_BUFFER_INFO() |
| 360 | if not GetConsoleScreenBufferInfo(OutHandle, info): |
| 361 | raise WinError(GetLastError()) |
| 362 | return ( |
| 363 | info.srWindow.Bottom - info.srWindow.Top + 1, |
| 364 | info.srWindow.Right - info.srWindow.Left + 1, |
| 365 | ) |
| 366 | |
| 367 | def _getscrollbacksize(self) -> int: |
| 368 | info = CONSOLE_SCREEN_BUFFER_INFO() |
no test coverage detected