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

Function _in_rpc_code

Lib/idlelib/debugger.py:58–71  ·  view source on GitHub ↗

Determine if debugger is within RPC code.

(frame)

Source from the content-addressed store, hash-verified

56 self.gui.interaction(message, frame, exc_info)
57
58def _in_rpc_code(frame):
59 "Determine if debugger is within RPC code."
60 if frame.f_code.co_filename.count('rpc.py'):
61 return True # Skip this frame.
62 else:
63 prev_frame = frame.f_back
64 if prev_frame is None:
65 return False
66 prev_name = prev_frame.f_code.co_filename
67 if 'idlelib' in prev_name and 'debugger' in prev_name:
68 # catch both idlelib/debugger.py and idlelib/debugger_r.py
69 # on both Posix and Windows
70 return False
71 return _in_rpc_code(prev_frame)
72
73def _frame2message(frame):
74 """Return a message string for frame."""

Callers 2

user_lineMethod · 0.85
user_exceptionMethod · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…