def METHOD_NAME(self, pat, msg, col=-1):
    # Derived class could override this with something fancier
    msg = "Error: " + str(msg)
    if pat:
        msg = msg + "\nPattern: " + str(pat)
    if col >= 0:
        msg = msg + "\nOffset: " + str(col)
    tkMessageBox.showerror("Regular expression error",
                           msg, master=self.root)