print("hi"elseself infobox("three"'hello!'on every third press def dialog(self)button self question('oops!''you typed "rm*continue?''questhead'('yes''no')[lambdanoneself quit][button](old style args ignored def fileopen(self)pick self selectopenfile(file='big_gui py'if pickself browser(pickbrowse my source fileor other def more(self)new toplevel(label(newtext=' new non-modal window'pack(button(newtext='quit'command=self quitpack(side=leftbutton(newtext='more'command=self morepack(side=rightdef pickdemo(self)pick self selectopenfile(dir='if pickself spawn(pickspawn any python program if __name__ ='__main__'hello(mainloop(make onerun one this script lays out fairly large menu and toolbar structureand also adds callback methods of its own that print stdout messagespop up text file browsers and new windowsand run other programs many of the callbacks don' do much more than run the notdone method inherited from guimixinthoughthis code is intended mostly as guimaker and guimixin demo when big_gui is run as top-level programit creates window with four menu pull downs on top and three-button toolbar on the bottomshown in figure - along with some of the pop-up windows its callbacks create the menus have separatorsdisabled entriesand cascading submenusall as defined by the menubar template used by guimakerand quit invokes the verifying dialog inherited from guimixin--some of the many tools we're getting for free here figure - shows this script' window againafter its play pull down has been used to launch three independently running demos that we wrote in and these demos are ultimately started by using the portable launcher tools we wrote in and acquired from the guimixin class if you want to run other demos on your computerselect the play menu' other option to pop up standard file selection dialog instead and navigate to the desired program' file one notei copied the icon bitmap used by the top-levels demo in the play menu to this script' directorylaterwe'll write tools that attempt to locate one automatically guimakerautomating menus and toolbars