views:

129

answers:

1

I've been trying to build a fairly simple message box in tkinter,that has an "YES" and "NO" buttons. When I push the "YES" button internally it must go and write to a file YES. Similarly,when "NO" is pushed, file must be written a NO.Any idea of how I could do this ?

+4  A: 

http://infohost.nmt.edu/tcc/help/pubs/tkinter/tkMessageBox.html

Looks like "askquestion()" is exactly what you want. It will even return the string "yes" or "no" for you!

MatrixFrog