download & install page Screenshots This work is licensed under the Creative Commons Attribution 2.0 License You are free to copy, distribute, and display the work, and to make derivative works (including translations). If you do, you must give the original author credit. The author specifically permits (and encourages) teachers to post, reproduce, and distribute some or all of this material for use in their classes or by their students. |
About EasyGUI
Learning to use EasyGUI
Download
|
|
|
from easygui import * import sys while 1: msgbox("Hello, world!") |
![]() |
msg ="What is your favorite flavor?" title = "Ice Cream Survey" choices = ["Vanilla", "Chocolate", "Strawberry", "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" if ccbox(msg, title): # show a Continue/Cancel dialog pass # user chose Continue else: sys.exit(0) # user chose Cancel |
![]() |