'''Outline for any GUI written with easyGUI.'''

import easygui

# Define a function here for each top-level action the user may choose.
# Give them appropriate names and arguments.

def do_thing1(n):
    print "Roses are red. " * n
    
def do_thing2(noun, verb):
    print "Along came a %s and %s beside her." % (noun, verb)
    
def do_thing3():
    print "Have you any wool?"

if __name__ == "__main__":

    # True iff the user has asked to stop
    stop = False
    
    prompt = 'What would you like to do?'
    title = 'Main choices'
    
    # Keep going until the user has chosen to stop.
    while not stop:
        
        # Let the user choose an action.
        # (Replace these choice strings with suitable ones for the actions
        # the user may choose.  Include "quit" as an action.)
        choice = easygui.buttonbox(
            prompt, title, ("thing1", "thing2", "thing3", "quit"))
        
        # Make sure the user actually chose something, i.e., didn't click
        # "Cancel".
        if choice:
            # Call the chosen function.  (Send in the appropriate arguments.)
            if choice == "thing1":
                do_thing1(3)
            elif choice == "thing2":
                do_thing2("spider", "sat down")
            elif choice == "thing3":
                do_thing3()
            elif choice == "quit":
                stop = True