1 2 answer = wx.MessageBox("Quit program?", "Confirm", 3 wx.YES_NO | wx.CANCEL, main_frame) 4 if answer == wx.YES: 5 main_frame.Close() 6