MCPcopy Create free account
hub / github.com/bpython/bpython / __init__

Method __init__

bpython/curtsiesfrontend/repl.py:105–121  ·  view source on GitHub ↗
(
        self,
        coderunner: CodeRunner,
        repl: "BaseRepl",
        configured_edit_keys: AbstractEdits | None = None,
    )

Source from the content-addressed store, hash-verified

103 so this class returns control to the UI to get that input."""
104
105 def __init__(
106 self,
107 coderunner: CodeRunner,
108 repl: "BaseRepl",
109 configured_edit_keys: AbstractEdits | None = None,
110 ):
111 self.coderunner = coderunner
112 self.repl = repl
113 self.has_focus = False # whether FakeStdin receives keypress events
114 self.current_line = ""
115 self.cursor_offset = 0
116 self.old_num_lines = 0
117 self.readline_results: list[str] = []
118 if configured_edit_keys is not None:
119 self.rl_char_sequences = configured_edit_keys
120 else:
121 self.rl_char_sequences = edit_keys
122
123 def process_event(self, e: events.Event | str) -> None:
124 assert self.has_focus

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected