EasyGui

Download     Documentation     Tutorial    Screenshots     Demo Apps     Cookbook     FAQs    Contact   

About EasyGUI

EasyGUI is a module for very simple, very easy GUI programming in Python.

Experienced Pythonistas need support for quick and dirty GUI features. New Python programmers need GUI capabilities that don't require any knowledge of Tkinter, frames, widgets, callbacks or lambda. This is what EasyGUI provides. Using EasyGUI, all GUI interactions are invoked by simple function calls.

EasyGUI is different from other GUIs in that EasyGUI is NOT event-driven. It allows you to program in a traditional linear fashion, and to put up dialogs for simple input and output when you need to. If you have not yet learned the event-driven paradigm for GUI programming, EasyGUI will allow you to be productive with very basic tasks immediately. Later, if you wish to make the transition to an event-driven GUI paradigm, you can do so with a more powerful GUI package such as anygui, PythonCard, Tkinter, wxPython, etc.

Learning to use EasyGUI

There is the EasyGui tutorial.

A nice way to learn about EasyGui is by viewing two videos that Austrian teacher Horst Jens has made with some children in his Python programming class. In one video Lexi shows msgbox, and in the other Leo shows buttonbox. The videos are several minutes each. The kids speak in German and the videos have English subtitles. While you are there, check out the other Python videos at ShowMeDo.

EasyGui in the News

At Linux.com: Dress up your Python scripts with EasyGui by Dmitri Popov (September 8, 2008)

Screenshots

multenterbox
choicebox
multchoicebox
passwordbox
msgbox
continue/cancel box
buttonbox with image
... and see the demo program (below).

A simple demo program using EasyGui

(screenshots to different scales)
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

Visit Pythonology.org for more information about Python