MCPcopy Index your code
hub / github.com/python/cpython / screen_xy

Method screen_xy

Lib/_pyrepl/windows_console.py:329–333  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

327
328 @property
329 def screen_xy(self) -> tuple[int, int]:
330 info = CONSOLE_SCREEN_BUFFER_INFO()
331 if not GetConsoleScreenBufferInfo(OutHandle, info):
332 raise WinError(get_last_error())
333 return info.dwCursorPosition.X, info.dwCursorPosition.Y
334
335 def _erase_to_end(self) -> None:
336 self.__write(ERASE_IN_LINE)

Callers

nothing calls this directly

Calls 3

WinErrorFunction · 0.90
get_last_errorFunction · 0.85

Tested by

no test coverage detected