askyesnocancel in tkMessageBox

John Michelsen john.michelsen at gte.net
Wed Apr 7 13:06:36 EDT 1999


>- /Fredrik Lundh is responsible for *documenting* Tkinter, but not for
>its maintenance (although he contributed a bunch of support modules).
>The maintenance of Tkinter is strictly my responsibility.  (Not that I
>asked for it. :-)


Could you put the following function in tkMessageBox then?:

def askyesnocancel(title=None, message=None, **options):
    "Ask a question; return yes, no, or cancel"
    return apply(_show, (title, message, WARNING, YESNOCANCEL), options)

I use it in a standard "closing the document" function so that the user can
close
with saving, without saving, or cancel the close.

Thanks,

John








More information about the Python-list mailing list