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)
| 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") |