in reply to Code after MainLoop; Tk

Don't exit, instead do

$mw->destroy