EasyGui version 0.94 has been released. It can be downloaded from the downloads page of the EasyGui page at SourceForge.
Highlights of this release include:
- The distribution now includes setup.py. This should make it easier to install EasyGui, especially for Mac users.
- Codebox and textbox now return the contents of the box. This makes it possible to use codebox and textbox as data-entry widgets. It also makes it possible to do something like this:
- retrieve some text from (say) a file
- display the text in a textbox or codebox
- have the user update it
- get the text back
- save the updated text in the file
- Support has been added for keyboard navigation with the arrow keys. Previously keyboard navigation recognized only the the TAB keys.
- In EgStore, the pickle file is now opened for reading and writing with “rb” and “wb” rather than with “r” and “w”. This change is necessary for compatibility with Python 3+.
There are also a number of minor bug fixes. See below for full details.
- 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.
- 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.
NOTE THAT enhancement #1 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.
- 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 the University of Toronto for reporting this problem.
- In choicebox, the signature to choicebox incorrectly showed choicebox as accepting a “buttons” argument.
The signature has been fixed.
- In integerbox, the “argLowerBound” and “argUpperBound” arguments have been renamed to “lowerbound” and “upperbound” and the docstring has been corrected.
NOTE THAT bug fix #4 breaks backward compatibility. If “argLowerBound” or “argUpperBound” are used as the names of keyword arguments, an AssertionError with an explanatory error message is raised. But because current users of integerbox are probably passing these values in as positional rather than keyword arguments, the effect of this change in actual practice is expected to be minimal.