EasyGui Home EasyGui Downloads Pydoc Docs Epydoc Docs Gallery Tutorial Cookbook Demo Apps FAQs Contact |
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.96.zip | EasyGui |
easygui_v0.96_docs.zip | EasyGui documentation and tutorial files (HTML) |
easygui_v0.96.tar.gz | EasyGui |
easygui_v0.96_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.96(2010-06-25) ======================================================================== This version fixes some problems with version independence. BUG FIXES ------------------------------------------------------ * A statement with Python 2.x-style exception-handling syntax raised a syntax error when running under Python 3.x. Thanks to David Williams for reporting this problem. * Under some circumstances, PIL was unable to display non-gif images that it should have been able to display. The cause appears to be non-version-independent import syntax. PIL modules are now imported with a version-independent syntax. Thanks to Horst Jens for reporting this problem. ======================================================================== 0.95(2010-06-12) ======================================================================== ENHANCEMENTS ------------------------------------------------------ * Previous versions of EasyGui could display only .gif image files using the msgbox "image" argument. This version can now display all image-file formats supported by PIL the Python Imaging Library) if PIL is installed. If msgbox is asked to open a non-gif image file, it attempts to import PIL and to use PIL to convert the image file to a displayable format. If PIL cannot be imported (probably because PIL is not installed) EasyGui displays an error message saying that PIL must be installed in order to display the image file. Note that http://www.pythonware.com/products/pil/ says that PIL doesn't yet support Python 3.x. ======================================================================== 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. 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.