MCPcopy Index your code
hub / github.com/python/cpython / prompt_for_reply

Method prompt_for_reply

Lib/pdb.py:3352–3366  ·  view source on GitHub ↗
(self, prompt)

Source from the content-addressed store, hash-verified

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

Callers 1

process_payloadMethod · 0.95

Calls 4

read_commandMethod · 0.95
_sendMethod · 0.95
format_exception_onlyMethod · 0.80
stripMethod · 0.45

Tested by

no test coverage detected