Beginner's popups in vanilla Python program

Stephen Ferg steve at
Mon Aug 4 14:42:47 CEST 2003

Look at EasyGui:

Here's what your program would look like:
# Program: ... "Hello World" for popups
from easygui import *

print "Begin program"

# Prepare the basic programmatic messages
strMess1 = "Is this a Test?"
strTitle1 = "Test Query"
strResponse = "You selected "
strTitle2 = "Response:"

boolVar = boolbox(strMess1, strTitle1, ["Yes", "No"])

# Build the appropriate response
if boolVar:
   strResponse += "YES"
   strResponse += "NO"

msgbox(strResponse, strTitle2)  # button is OK
boolbox(strResponse, strTitle2, ["Close"]) # button is Close
print "End of Program"

More information about the Python-list mailing list