MCPcopy Index your code
hub / github.com/bpython/bpython / prompt

Method prompt

bpython/urwid.py:544–554  ·  view source on GitHub ↗

Prompt the user for input. The result will be returned via calling callback. Note that there can only be one prompt active. But the callback can already start a new prompt.

(self, s, callback=None, single=False)

Source from the content-addressed store, hash-verified

542 return self.statusbar.message(s, n)
543
544 def prompt(self, s, callback=None, single=False):
545 """Prompt the user for input. The result will be returned via calling
546 callback. Note that there can only be one prompt active. But the
547 callback can already start a new prompt."""
548
549 if self.callback is not None:
550 raise Exception("Prompt already in progress")
551
552 self.callback = callback
553 self.statusbar.prompt(s, single=single)
554 self.frame.set_focus("footer")
555
556 def _prompt_result(self, text):
557 self.frame.set_focus("body")

Callers 1

confirmMethod · 0.95

Calls 1

promptMethod · 0.45

Tested by

no test coverage detected