in reply to Using a Tk window within a function
By the way, I've discovered the answer to my original question - if you destroy all of your MainWindows, execution pops out of the end of MainLoop back into your code. I swear I tried that, but anyway it works now...