EasyGui


ferg.org home
contact Info

download & install page
tutorial page
sample easygui application
revision history
documentation (pydoc)
documentation (epydoc)

experimental versions

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


Creative Commons Licence

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

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 an easygui tutorial page.

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.

Download

See the easygui download page for download and install information, and for a revision history.


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