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

Method __init__

bpython/urwid.py:178–191  ·  view source on GitHub ↗
(self, config, s=None, main_loop=None)

Source from the content-addressed store, hash-verified

176 signals = ["prompt_result"]
177
178 def __init__(self, config, s=None, main_loop=None):
179 self.config = config
180 self.timer = None
181 self.main_loop = main_loop
182 self.s = s or ""
183
184 self.text = urwid.Text(("main", self.s))
185 # use wrap mode 'clip' to just cut off at the end of line
186 self.text.set_wrap_mode("clip")
187
188 self.edit = StatusbarEdit(("main", ""))
189 urwid.connect_signal(self.edit, "prompt_enter", self._on_prompt_enter)
190
191 self.widget = urwid.Columns([self.text, self.edit])
192
193 def _check(self, callback, userdata=None):
194 """This is the method is called from the timer to reset the status bar."""

Callers

nothing calls this directly

Calls 1

StatusbarEditClass · 0.85

Tested by

no test coverage detected