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

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