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

Method interaction

Lib/idlelib/debugger.py:252–300  ·  view source on GitHub ↗
(self, message, frame, info=None)

Source from the content-addressed store, hash-verified

250 self.show_globals()
251
252 def interaction(self, message, frame, info=None):
253 self.frame = frame
254 self.status.configure(text=message)
255
256 if info:
257 type, value, tb = info
258 try:
259 m1 = type.__name__
260 except AttributeError:
261 m1 = "%s" % str(type)
262 if value is not None:
263 try:
264 # TODO redo entire section, tries not needed.
265 m1 = f"{m1}: {value}"
266 except:
267 pass
268 bg = "yellow"
269 else:
270 m1 = ""
271 tb = None
272 bg = self.errorbg
273 self.error.configure(text=m1, background=bg)
274
275 sv = self.stackviewer
276 if sv:
277 stack, i = self.idb.get_stack(self.frame, tb)
278 sv.load_stack(stack, i)
279
280 self.show_variables(1)
281
282 if self.vsource.get():
283 self.sync_source_line()
284
285 for b in self.buttons:
286 b.configure(state="normal")
287
288 self.top.wakeup()
289 # Nested main loop: Tkinter's main loop is not reentrant, so use
290 # Tcl's vwait facility, which reenters the event loop until an
291 # event handler sets the variable we're waiting on.
292 self.nesting_level += 1
293 self.root.tk.call('vwait', '::idledebugwait')
294 self.nesting_level -= 1
295
296 for b in self.buttons:
297 b.configure(state="disabled")
298 self.status.configure(text="")
299 self.error.configure(text="", background=self.errorbg)
300 self.frame = None
301
302 def sync_source_line(self):
303 frame = self.frame

Callers 2

user_lineMethod · 0.45
user_exceptionMethod · 0.45

Calls 9

show_variablesMethod · 0.95
sync_source_lineMethod · 0.95
strFunction · 0.85
load_stackMethod · 0.80
configureMethod · 0.45
get_stackMethod · 0.45
getMethod · 0.45
wakeupMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected