tk __init__(selfself __app app self configborders(appkindiconfiledef quit(self)if self okaytoquit()threads runningif askyesno(self __app'verify quit program?')self destroy(quit whole app elseshowinfo(self __app'quit not allowed'or in okaytoquitdef destroy(self)tk quit(selfexit app silently redef if exit ops def okaytoquit(self)return true redef me if used thread busy class popupwindow(toplevel_window)""when run in secondary pop-up window ""def __init__(selfappkind=''iconfile=none)toplevel __init__(selfself __app app self configborders(appkindiconfiledef quit(self)if askyesno(self __app'verify quit window?')self destroy(redef me to change or call destroy quit this window def destroy(self)toplevel destroy(selfclose win silently redef for close ops class quietpopupwindow(popupwindow)def quit(self)self destroy(don' verify close class componentwindow(frame)""when attached to another display ""def __init__(selfparent)frame __init__(selfparentself pack(expand=yesfill=bothself config(relief=ridgeborder= if not frame provide container reconfig to change def quit(self)showinfo('quit''not supported in attachment mode'destroy from frameerase frame silent redef for close ops so why not just set an application' icon and title by calling protocol methods directlyfor one thingthose are the sorts of details that are easy to forget (you will probably wind up cutting and pasting code much of the timefor anotherthese classes add gui coding techniques