def Warn(self, message, caption='Warning!'): dlg = wx.MessageDialog( None, message, caption, wx.OK | wx.ICON_WARNING) dlg.ShowModal() dlg.Destroy()