Revision 38 as of 2006-09-21 05:47:01

Clear message

Tkinter is Python's de-facto standard GUI (Graphical User Interface) package. It is a thin object-oriented layer on top of Tcl/[http://sourceforge.net/projects/tktoolkit/ Tk].

Tkinter is not the only GuiProgramming toolkit for Python. It is however the most commonly used one, and almost the only one that is portable between Unix, Mac and Windows. CameronLaird calls the yearly decision to keep TkInter "one of the minor traditions of the Python world."

The Tkinter wiki: http://tkinter.unpythonic.net/wiki/

Tkinter Documentation

David McNab recommended the latter two as particularly "pythonic" in not insisting that readers think in Tcl.

Tkinter Extensions

Comments

MythDebunking: TkInter is ugly on Windows (http://wiki.tcl.tk/TkWidgetsLookFine)

Checking your Tkinter support

A good way to systematically check whether your Tkinter support is working is the following.

Enter an interactive Python interpreter in a shell on an X console.

Step 1 - can _tkinter be imported?

Try the following command at the Python prompt:

>>> import _tkinter # with underscore, and lowercase 't'

Step 2 - can Tkinter be imported?

Try the following command at the Python prompt:

>>> import Tkinter # no underscore, uppercase 'T'

Step 3 - does Tkinter work?

Try the following command at the Python prompt:

>>> Tkinter._test() # note underscore in _test()

Unable to edit the page? See the FrontPage for instructions.