Please send questions to
st10@humboldt.edu .
'''
easyguiEx1.py - playing with easygui, built atop Tkinter
(note that I wimped out and just put the downloaded easygui.py
in the same directory as this example)
(note that this example is adapted from:
http://www.ferg.org/easygui/
adapted by: Sharon Tuttle
last modified: 10-26-06
'''
from easygui import *
import sys
while 1:
msgbox("Hello, EasyGui world!")
msg = "What is your favorite flavor?"
title = "Ice Cream Survey"
choices = ["Vanilla", "Chocolate", "Strawberry", "Spam", "Rocky Road"]
choice = choicebox(msg, title, choices)
# note that we convert choice to string, in case the user
# cancelled the choice and we got None
msgbox("You chose: " + str(choice), "Survey Result")
msg = "Do you want to continue?"
title = "Please Confirm"
# show a confirm/cancel dialog
if ccbox(msg, title):
pass # user chose Continue
else:
sys.exit(0) # user chose Cancel