def confirm(message="<STR_LIT>", title="<STR_LIT>", default=False, ok=False, cancel=False,<EOL>parent=None):
style = wx.CENTRE<EOL>if ok:<EOL><INDENT>style |= wx.OK <EOL><DEDENT>else:<EOL><INDENT>style |= wx.YES | wx.NO<EOL>if default:<EOL><INDENT>style |= wx.YES_DEFAULT<EOL><DEDENT>else:<EOL><INDENT>style |= wx.NO_DEFAULT<EOL><DEDENT><DEDENT>if cancel:<EOL><INDENT>style |= wx.CANCEL<EOL><DEDENT>result = dialogs.messageDialog(parent, message, title, style)<EOL>if cancel and result.returned == wx.ID_CANCEL:<EOL><INDENT>return None<EOL><DEDENT>return result.accepted<EOL>
Ask for confirmation (yes/no or ok and cancel), returns True or False