Advertisement
Guest User

Catch MainLoop exceptions and displaying them in MessageDialogs

a guest
Feb 27th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. if __name__ == '__main__':
  2. app = MyApp(0)
  3. try:
  4. MainWindow(None, -1, 'My Cool App')
  5. app.MainLoop()
  6. except ConfigParser.Error, error_message:
  7. messagebox = wx.MessageDialog(None, error_message, 'Configuration Error', wx.OK | wx.ICON_ERROR)
  8. messagebox.ShowModal()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement