button(selftext='sing'command=self destroypack(contentsub(non-class usage win popupwindow('popup''attachment'button(wintext='redwood'command=win quitpack(button(wintext='sing 'command=win destroypack(mainloop(if __name__ ='__main__'_selftest(when runthe test generates the window in figure - all generated windows get blue "pyicon automaticallyand intercept and verify the window manager' upper right corner "xclose buttonthanks to the search and configuration logic they inherit from the window module' classes some of the buttons on the test windows close just the enclosing windowsome close the entire applicationsome erase an attached windowand others pop up quit verification dialog run this on your own to see what the examplesbuttons doso you can correlate with the test codequit actions are tailored to make sense for the type of window being run figure - windows-test display we'll use these window protocol wrappers in the next pyclock exampleand then again later in where they'll come in handy to reduce the complexity of the pymailgui program part of the benefit of doing oop in python now is that we can forget the details later gui coding techniques