(self, prompt)
| 3350 | raise RuntimeError(f"Unrecognized payload {payload}") |
| 3351 | |
| 3352 | def prompt_for_reply(self, prompt): |
| 3353 | while True: |
| 3354 | try: |
| 3355 | payload = {"reply": self.read_command(prompt)} |
| 3356 | except EOFError: |
| 3357 | payload = {"signal": "EOF"} |
| 3358 | except KeyboardInterrupt: |
| 3359 | payload = {"signal": "INT"} |
| 3360 | except Exception as exc: |
| 3361 | msg = traceback.format_exception_only(exc)[-1].strip() |
| 3362 | print("***", msg, flush=True) |
| 3363 | continue |
| 3364 | |
| 3365 | self._send(**payload) |
| 3366 | return |
| 3367 | |
| 3368 | def complete(self, text, state): |
| 3369 | import readline |
no test coverage detected