There are a number of different packages that enable GUIs in Python. TKinter is not perfect but it is installed as standard which makes it a handy choice for schools. These are some notes on creating GUIs and Games in Python using TKinter.
TKinter seems to be installed as standard and it’s availability can be confirmed by typing:
import _tkinter # with underscore, and lowercase 't'
If this works then try on of the following depending on your version
import Tkinter # no underscore, uppercase 'T' for versions prior to V3.0
import tkinter # no underscore, lowercase 't' for V3.0 and later
Finally once you have determined that you can import tkinter try running a small text GUI with one of the following:
Tkinter._test() # note underscore in _test and uppercase 'T' for versions prior to V3.0 tkinter._test() # note underscore in _test and lowercase 'T' for V3.0 and later
For more information see the Checking tkinter support section on the tkinter homepage.
- Reference – http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html
- Wiki – http://tkinter.unpythonic.net/wiki/
- TKDocs – http://www.tkdocs.com
- EffBot – http://effbot.org/tkinterbook/