What code exactly does mainloop() loop over? I've seen a couple examples where the loop appears to be run over the init function of a window object, but also some where it seems to run over the whole program/no particular object. For what reasons would you set it up one way or the other? And how can you tell what mainloop() is going to execute?
I've read a bunch of Tkinter documentation and StackOverflow questions and (admittedly only skimmed) a couple tutorials, and they all tell me that mainloop() creates and executes an eternal event loop... but there's no detail on what code constitutes the event loop.