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

Method _read_until_prompt

Lib/test/test_remote_pdb.py:1093–1104  ·  view source on GitHub ↗

Helper to read messages until a prompt is received.

(self, client_file)

Source from the content-addressed store, hash-verified

1091 return process, client_file
1092
1093 def _read_until_prompt(self, client_file):
1094 """Helper to read messages until a prompt is received."""
1095 messages = []
1096 while True:
1097 data = client_file.readline()
1098 if not data:
1099 break
1100 msg = json.loads(data.decode())
1101 messages.append(msg)
1102 if 'prompt' in msg:
1103 break
1104 return messages
1105
1106 def _send_command(self, client_file, command):
1107 """Helper to send a command to the debugger."""

Calls 4

readlineMethod · 0.45
loadsMethod · 0.45
decodeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected