def __init__(self)self mymenu {'pack 'runpackdialog'unpack'rununpackdialog'mtool 'self notdonedictmenugui __init__(selfif __name__ ='__main__'from sys import argv if len(argv and argv[ ='list'print('list test'textpak (mainloop(elseprint('dict test'textpak (mainloop(or use input here instead of in dialogs self-test code 'menugui py list|^the classes in this module are specific to particular tool setto display different set of tool namessimply code and run new subclass by separating out application logic into distinct subclasses and modules like thissoftware can become widely reusable figure - shows the main shellgui window created when the mytools script is run with its list-based menu layout class on windows along with menu tear-offs so that you can see what they contain this window' menu and toolbar are built by gui makerand its quit and help buttons and menu selections trigger quit and help methods inherited from guimixin through the shellgui module' superclasses are you starting to see why this book preaches code reuse so oftenfigure - mytools items in shellgui window gui coding techniques