class mainapp(wx app)def oninit(self)""initialise the gui display""frame helloframe(title='sample app'frame show(indicate whether processing should continue or not return true def onexit(self)""executes when the gui application shuts down""print('goodbye'need to indicate success or failure return true run the gui application app mainapp(app mainloop(if the user enters their name in the top textctrl fieldfor example 'phoebe'then when they click on the 'enterbutton the welcome label changes to 'welcome phoebe'if they now click on the 'show messagebutton then the wx messagedialog ( specific type of wx dialogwill display welcome message to phoebe