Schedule the callable func to be called, with args and kw passed to it, when the Tk main loop next becomes idle, that is, when it has no other events to process. Return an identifier that can be passed to after_cancel() to cancel the call.
tkinter/Misc.after_idle
Misc.after_idle