Revision 81 as of 2009-07-26 02:59:23

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/Tk.

Tkinter is not the only GuiProgramming toolkit for Python. It is however the most commonly used one. 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/8646)

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' prior to V3.0; lowercase 't' from v3.0

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.