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

Method __write

Lib/_pyrepl/windows_console.py:318–326  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

316 self.__write("\x1b[?2004l")
317
318 def __write(self, text: str) -> None:
319 if "\x1a" in text:
320 text = ''.join(["^Z" if x == '\x1a' else x for x in text])
321
322 if self.out is not None:
323 self.out.write(text.encode(self.encoding, "replace"))
324 self.out.flush()
325 else:
326 os.write(self.output_fd, text.encode(self.encoding, "replace"))
327
328 @property
329 def screen_xy(self) -> tuple[int, int]:

Callers 13

refreshMethod · 0.95
__write_changed_lineMethod · 0.95
_hide_cursorMethod · 0.95
_show_cursorMethod · 0.95
_enable_blinkingMethod · 0.95
_disable_blinkingMethod · 0.95
_erase_to_endMethod · 0.95
_move_relativeMethod · 0.95
beepMethod · 0.95
clearMethod · 0.95

Calls 4

joinMethod · 0.45
writeMethod · 0.45
encodeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected