How would I define the command of a given button in a messagebox window? i.e. if I were using askokcanel how would I make the ok do a certain action and cancel another?

I figured it out, it's just...kind of strange and ugly.

import tkinter.MessageBox as tkm
if not tkm.askokcancel('Invalid Login', 'Either your username or password was invalid\n\t\tPlease try again'):