def start(self)texteditor start(selffor in range(len(self toolbar))if self toolbar[ ][ ='quit'del self toolbar[ibreak if self deletefilefor in range(len(self menubar))if self menubar[ ][ ='file'del self menubar[ibreak elsefor (namekeyitemsin self menubarif name ='file'items append([ , , , , ]guimaker start call delete quit in toolbar delete file menu itemsor just disable file ###############################################################################standalone program run ###############################################################################def testpopup()see pyview and pymail for component tests root tk(texteditormainpopup(roottexteditormainpopup(rootbutton(roottext='more'command=texteditormainpopuppack(fill=xbutton(roottext='quit'command=root quitpack(fill=xroot mainloop(def main()may be typed or clicked tryor associated on windows fname sys argv[ arg optional filename except indexerrorbuild in default tk root fname none texteditormain(loadfirst=fnamepack(expand=yesfill=bothpack optional mainloop(if __name__ ='__main__'#testpopup(main(when run as script run pyw for no dos box pyphotoan image viewer and resizer in we wrote simple thumbnail image viewer that scrolled its thumbnails in canvas that program in turn built on techniques and code we developed at the end of to handle images in both placesi promised that we' eventually meet more full-featured extension of the ideas we deployed in this sectionwe finally wrap up the thumbnail images thread by studying pyphoto-an enhanced image viewing and resizing program pyphoto' basic operation is complete gui programs