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

Method prepare

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

Source from the content-addressed store, hash-verified

336 self.__write(ERASE_IN_LINE)
337
338 def prepare(self) -> None:
339 trace("prepare")
340 self.screen = []
341 self.height, self.width = self.getheightwidth()
342
343 self.posxy = 0, 0
344 self.__offset = 0
345
346 if self.__vt_support:
347 if not SetConsoleMode(InHandle, self.__original_input_mode | ENABLE_VIRTUAL_TERMINAL_INPUT):
348 raise WinError(get_last_error())
349 self._enable_bracketed_paste()
350
351 def restore(self) -> None:
352 if self.__vt_support:

Callers 1

consoleMethod · 0.95

Calls 5

getheightwidthMethod · 0.95
traceFunction · 0.90
WinErrorFunction · 0.90
get_last_errorFunction · 0.85

Tested by 1

consoleMethod · 0.76