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'):
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.