frm mainloop(fails!--need part top pack(side=rightthis won' quite workbecause part isn' really widget to treat it as suchyou must descend to part top before making gui configurations and hope that the name top is never changed by the class' developer in other wordsit exposes some of the class' internals the class could make this better by defining method that always routes unknown attribute fetches to the embedded frameas in example - example - pp \gui\intro\gui py import gui from tkinter import class hellopackage(gui hellopackage)def __getattr__(selfname)return getattr(self topnamepass off to real widget if __name__ ='__main__'hellopackage(mainloop(invokes __getattr__as isthis script simply creates figure - againchanging example - to import this extended hellopackage from gui cthoughproduces the correctly-working window in figure - figure - standalone class package in action routing attribute fetches to nested widgets works this waybut that then requires even more extra coding in standalone package classes as usualthoughthe significance of all these trade-offs varies per application the end of the tutorial in this we learned the core concepts of python/tkinter programming and met handful of simple widget objects along the way-- labelsbuttonsframesand the packer geometry manager we've seen enough to construct simple interfacesbut we have really only scratched the surface of the tkinter widget set in the next two we will apply what we've learned here to study the rest of the tkinter libraryand we'll learn how to use it to generate the kinds of interfaces you expect to see in realistic gui programs as preview and roadmaptable - lists the kinds of widgets we'll meet there in roughly their order of appearance note that this graphical user interfaces