def message(self, text): self.interact(ask_ok(text), default_handler=lambda *ignored: self.exit())
def _messenger(*args, **kwargs): try: buddy.interact(ask_next(text.next()), next=_messenger) except StopIteration: buddy.interact(ask_ok(last_text), ok=lambda *_: buddy.exit())