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

Function after_callback

Lib/idlelib/idle_test/tkinter_testing_utils.py:39–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 # harness to capture them.
38 exception = None
39 def after_callback():
40 nonlocal exception
41 try:
42 next(test_generator)
43 except StopIteration:
44 root.quit()
45 except Exception as exc:
46 exception = exc
47 root.quit()
48 else:
49 # Schedule the Tk mainloop to call this function again,
50 # using a robust method of ensuring that it gets a
51 # chance to process queued events before doing so.
52 # See: https://stackoverflow.com/q/18499082#comment65004099_38817470
53 root.after(delay, root.after_idle, after_callback)
54 root.after(0, root.after_idle, after_callback)
55 root.mainloop()
56

Callers

nothing calls this directly

Calls 2

afterMethod · 0.80
quitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…