MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

Lib/_pyrepl/unix_eventqueue.py:74–84  ·  view source on GitHub ↗
(self, fd: int, encoding: str)

Source from the content-addressed store, hash-verified

72
73class EventQueue:
74 def __init__(self, fd: int, encoding: str) -> None:
75 self.keycodes = get_terminal_keycodes()
76 if os.isatty(fd):
77 backspace = tcgetattr(fd)[6][VERASE]
78 self.keycodes[backspace] = "backspace"
79 self.compiled_keymap = keymap.compile_keymap(self.keycodes)
80 self.keymap = self.compiled_keymap
81 trace("keymap {k!r}", k=self.keymap)
82 self.encoding = encoding
83 self.events: deque[Event] = deque()
84 self.buf = bytearray()
85
86 def get(self) -> Event | None:
87 """

Callers

nothing calls this directly

Calls 4

tcgetattrFunction · 0.90
traceFunction · 0.90
get_terminal_keycodesFunction · 0.85
isattyMethod · 0.45

Tested by

no test coverage detected