EasyGui Home EasyGui Downloads Pydoc Docs Epydoc Docs Tutorial Cookbook Demo Apps FAQs Contact |
EasyGui v0.94 was released 2010-06-06. The release announcement and summary of changes is available on the EasyGui blog.
The EasyGui HTML documentation is available in a separate file from EasyGui itself. This is so you can download EasyGui without downloading the documentation.
easygui_v0.94.zip | EasyGui |
easygui_v0.94_docs.zip | EasyGui documentation and tutorial files (HTML) |
easygui_v0.94.tar.gz | EasyGui |
easygui_v0.94_docs.tar.gz | EasyGui documentation and tutorial files (HTML) |
- Download the archive file of your choice
- Unpack the archive file into a temporary directory
- In the temporary directory, locate the file called setup.py
- In a console window, at the command prompt, enter the command:
python setup.py installIf you're using some form of Linux (e.g. Ubuntu) you may need to use the sudo command
sudo python setup.py installor something (depending on your version of Python) like this
sudo /usr/bin/python2.6 setup.py installNote that the easygui.py file should be installed directly into Python's site-packages directory. It should not be installed in a site-packages/easygui directory. Doing so will probably cause your "import" statement for easygui to fail.
Thanks to Ned Deily for help in creating setup.py. In the future, we'd like to provide more sophisticated installation tools. But for now, setup.py is a big improvement.
Optional installation: python_and_logo.gif
When EasyGui is run from the command-line, it displays a menu-driven demo of its features. Some of the demos display a picture. To see the picture: from the archive file extract
python_and_logo.gif
and place it in the directory from which you will be running the EasyGui demo.
EasyGui font specs — including font size —are hard-coded. (This unfortunate situation will be improved in some future version.) The hard-coded font specs are generally reasonable, but the actual appearance of text on the screen is dependent on a number of variables (including your screen resolution) and so may produce screen text that is smaller or larger than you prefer. This means that the EasyGui feature that you are most likely to want to modify are the font-size specs. Here's how to do it.
Near the top of the code for easygui.py you will find lines that look something like this.
PROPORTIONAL_FONT_FAMILY = ("MS", "Sans", "Serif") MONOSPACE_FONT_FAMILY = ("Courier") PROPORTIONAL_FONT_SIZE = 10 MONOSPACE_FONT_SIZE = 9 # a little smaller, because it is more legible at a smaller size TEXT_ENTRY_FONT_SIZE = 12 # a little larger makes it easier to seeYou can edit easygui.py to change these settings to values that work best on your computer.
Download the archive file and extract it to a directory of your choce. In that directory
index.html
is the entry point for the HTML documentation.
In application programs that use EasyGui, code:from easygui import *For more information, see the tutorial.
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.
======================================================================== 0.94(2010-06-06) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * The codebox and textbox functions now return the contents of the box, rather than simply the name of the button ("Yes"). This makes it possible to use codebox and textbox as data-entry widgets. A big "thank you!" to Dominic Comtois for requesting this feature, patiently explaining his requirement, and helping to discover the tkinter techniques to implement it. NOTE THAT in theory this change breaks backward compatibility. But because (in previous versions of EasyGui) the value returned by codebox and textbox was meaningless, no application should have been checking it. So in actual practice, this change should not break backward compatibility. * Added support for SPACEBAR to command buttons. Now, when keyboard focus is on a command button, a press of the SPACEBAR will act like a press of the ENTER key; it will activate the command button. * Added support for keyboard navigation with the arrow keys (up,down,left,right) to the fields and buttons in enterbox, multenterbox and multpasswordbox, and to the buttons in choicebox and all buttonboxes. * added highlightthickness=2 to entry fields in multenterbox and multpasswordbox. Now it is easier to tell which entry field has keyboard focus. BUG FIXES ------------------------------------------------------ * In EgStore, the pickle file is now opened with "rb" and "wb" rather than with "r" and "w". This change is necessary for compatibility with Python 3+. Thanks to Marshall Mattingly for reporting this problem and providing the fix. * In integerbox, the actual argument names did not match the names described in the docstring. Thanks to Daniel Zingaro of at University of Toronto for reporting this problem. * In integerbox, the "argLowerBound" and "argUpperBound" arguments have been renamed to "lowerbound" and "upperbound" and the docstring has been corrected. NOTE THAT THIS CHANGE TO THE ARGUMENT-NAMES BREAKS BACKWARD COMPATIBILITY. If argLowerBound or argUpperBound are used, an AssertionError with an explanatory error message is raised. * In choicebox, the signature to choicebox incorrectly showed choicebox as accepting a "buttons" argument. The signature has been fixed. ======================================================================== 0.93(2009-07-07) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * Added exceptionbox to display stack trace of exceptions * modified names of some font-related constants to make it easier to customize them ======================================================================== 0.92(2009-06-22) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * Added EgStore class to to provide basic easy-to-use persistence. * Added section on EgStore to end of the tutorial. BUG FIXES ------------------------------------------------------ * Fixed a bug that was preventing Linux users from copying text out of a textbox and a codebox. This was not a problem for Windows users. ======================================================================== version: 0.91(2009-04-25) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * exposed egdemo(). Now you can write a program like this: from easygui import * egdemo() # run the easygui demo BUG FIXES ------------------------------------------------------ * Removed some fileopenbox test code that was accidentally left in, causing egdemo to crash. * Made EasyGui "version 2.5 aware" so that it will use the correct default filemask in fileopenbox and filesavebox under Python 2.5 and earlier. * fixed bugs in filesavebox by converting it to use the same code as fileopenbox for handling the "default" and "filetypes" args. ======================================================================== version: 0.90(2009-04-20) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * Enhanced fileopenbox to allow it to accept multiple extensions for a single file type, e.g.: ... filetype = [[".htm",".html", "HTML filetypes"]] Previously it accepted only one. * added some new screenshots to the tutorial BUG FIXES ------------------------------------------------------ * Fixed a bug in fileopenbox (it was not displaying initialfile). Thanks to Matthias Meier in the lovely city of Schwerin, Germany (http://en.wikipedia.org/wiki/Schwerin) for reporting the problem and supplying the basic elements of the fix. * In fileopenbox, removed acceptance of a 1-tuple as a filetype. This was an unnecessary and confusing feature. In theory, this change will break backward compatibility ... but there are probably no programs that used this feature. NOTES ---------------------------------------------------------- In some cases (e.g. ... default="junk.txt") there are minor differences in the display of fileopenbox between Python version 2.5 on the one hand, and Python version 2.6 and higher on the other. Python versions 2.6+ behave correctly. ======================================================================== version 0.89(2009-04-09) ======================================================================== BUG FIX ------------------------------------------------------ * An enhancement in version 0.88 (which added an import of StringIO) broke compatibility with Python 3. "In Python 3, the StringIO and cStringIO modules are gone. Instead, import the io module and use io.StringIO or io.BytesIO for text and data respectively." Many thanks to Alan Gauld, author of the "Learning to Program" web site, for reporting this problem and supplying the fix. Note that the newest version of Alan's tutorial is based on Python version 3. Check it out at the "Learning to Program" web site: http://www.alan-g.me.uk/l2p. ======================================================================== version 0.88(2009-04-06) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * Support for display of images has been extended to the various flavors of enterbox. An example of an enterbox with an image was added to the EasyGui demo. MODIFICATIONS ------------------------------------------------------ * In EasyGui demo, HELP output is now captured and displayed in a codebox rather than being written to stdout. BUG FIX ------------------------------------------------------ * Fixed a bug in fileopenbox. Thanks to Dennis A. Wolf for both the bug report and the fix. ======================================================================== version 0.87(2009-03-18) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * EasyGui will now run under Python version 3.* as well as version 2.* ======================================================================== version 0.86(2009-02-29) ======================================================================== BUG FIXES ------------------------------------------------------ * fixed a bug in which fileopenbox simply wasn't behaving properly Thanks to Dick Holtman for reporting this bug. * Fixed a bug pattern in which several of the buttonboxes did not recognize the "image" argument. Thanks to Daniel Schmidt for reporting this bug. ======================================================================== version 0.85(2009-01-16) ======================================================================== BUG FIXES ------------------------------------------------------ * fixed a bug in which fileopenbox and filesavebox were displaying the default (filemask) as the initial file rather than as the type of file to filter. Thanks to David Stagowski for reporting this bug. * fixed a bug in which filleopenbox, filesavebox, and diropenbox were not destroying the root window, which was causing subsequent invocations of buttonbox not to display the requested image. Thanks to Daniel Schmidt for reporting this bug. ENHANCEMENTS ------------------------------------------------------ * modified fileopenbox, filesavebox, and diropenbox so that the "msg" argument (if specified) is no longer ignored, but appended to the "title" argument and displayed in the title bar. This will make it easier for the Python programmer to figure out the problem when incorrect arguments are passed to these boxes. * renamed "EasyGuiRevisionInfo" to "egversion" and exposed it to calling programs. ======================================================================== version 0.83 2008-06-12 ======================================================================== BUG FIXES ------------------------------------------------------ * fixed a bug in which fileopenbox, filesavebox, and diropenbox were returning an empty tuple, rather than None, when a user cancelled. Thanks to Nate Soares for reporting this and sending in a fix. BACKWARD-INCOMPATIBLE CHANGES ------------------------------------------------------ * changed enterbox so that by default it strips its result (i.e. removes leading and trailing whitespace). If you want it not to strip, use keyword argument: strip=False. This change makes it easier to test the results of the call:: reply = enterbox(....) if reply: ... else: ... * changed the name of the "button_text" (formerly "buttonMessage") parameter to "ok_button" in the msgbox parameters. ======================================================================== version 0.80 2008-06-02 ======================================================================== ENHANCEMENTS ------------------------------------------------------ * added image keyword to msgbox and buttonbox Note that it can display only .gif images. see: http://effbot.org/tkinterbook/photoimage.htm * improved a lot of the docstrings. * added a new abouteasygui() function BUG FIXES ------------------------------------------------------ * changed mutable default arguments (lists) to tuples * diropenbox, fileopenbox, and filesavebox now execute os.path.normpath() on the choice before returning it. This fixes a nasty bug/inconvenience for Windows users. * In integerbox: old behavior: If user cancels, the default value is returned. new behavior: If user cancels, None is returned. NOTE that this bugfix has the potential to break existing programs. CHANGES ------------------------------------------------------ * removed the "restore default" button on enterbox. It was non-standard and was too long to display properly in some environments. * default message for buttonbox changed from "Shall I continue?" to just "". BACKWARD-INCOMPATIBLE CHANGES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These changes may break backward compatibility. Note that the following changes may break backward compatibility in programs that invoke EasyGui functions with keyword (rather than positional) arguments. They have been changed in order to standardize keyword arguments, so that EasyGui functions can be more easily used with keyword arguments. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ changed parameter name "message" to "msg" everywhere changed parameter name "buttonMessage" to "button_text" changed parameter name "argListOfFieldNames" to "fields" changed parameter name "argListOfFieldValues" to "values" changed the following parameter names to "default": argDefault argDefaultPassword argDefaultText argInitialFile argInitialDir