### Navigation

- index
- modules |
- next |
- previous |
- Python v2.6.4 documentation »
- The Python Standard Library »

# 25. Graphical User Interfaces with Tk

Tk/Tcl has long been an integral part of Python. It provides a robust and platform independent windowing toolkit, that is available to Python programmers using the `Tkinter` module, and its extension, the `Tix` module.

The `Tkinter` module is a thin object-oriented layer on top of Tcl/Tk. To use `Tkinter`, you don’t need to write Tcl code, but you will need to consult the Tk documentation, and occasionally the Tcl documentation. `Tkinter` is a set of wrappers that implement the Tk widgets as Python classes. In addition, the internal module `_tkinter` provides a threadsafe mechanism which allows Python and Tcl to interact.

`Tkinter`‘s chief virtues are that it is fast, and that it usually comes bundled with Python. Although its standard documentation is weak, good material is available, which includes: references, tutorials, a book and others. `Tkinter` is also famous for having an outdated look and feel, which has been vastly improved in Tk 8.5. Nevertheless, there are many other GUI libraries that you could be interested in. For more information about alternatives, see the Other Graphical User Interface Packages section.

- 25.1. `Tkinter` — Python interface to Tcl/Tk
  - 25.1.1. Tkinter Modules
  - 25.1.2. Tkinter Life Preserver
    - 25.1.2.1. How To Use This Section
    - 25.1.2.2. A Simple Hello World Program
  - 25.1.3. A (Very) Quick Look at Tcl/Tk
  - 25.1.4. Mapping Basic Tk into Tkinter
  - 25.1.5. How Tk and Tkinter are Related
  - 25.1.6. Handy Reference
    - 25.1.6.1. Setting Options
    - 25.1.6.2. The Packer
    - 25.1.6.3. Packer Options
    - 25.1.6.4. Coupling Widget Variables
    - 25.1.6.5. The Window Manager
    - 25.1.6.6. Tk Option Data Types
    - 25.1.6.7. Bindings and Events
    - 25.1.6.8. The index Parameter
    - 25.1.6.9. Images
- 25.2. `Tix` — Extension widgets for Tk
  - 25.2.1. Using Tix
  - 25.2.2. Tix Widgets
    - 25.2.2.1. Basic Widgets
    - 25.2.2.2. File Selectors
    - 25.2.2.3. Hierarchical ListBox
    - 25.2.2.4. Tabular ListBox
    - 25.2.2.5. Manager Widgets
    - 25.2.2.6. Image Types
    - 25.2.2.7. Miscellaneous Widgets
    - 25.2.2.8. Form Geometry Manager
  - 25.2.3. Tix Commands
- 25.3. `ScrolledText` — Scrolled Text Widget
- 25.4. `turtle` — Turtle graphics for Tk
  - 25.4.1. Introduction
  - 25.4.2. Overview over available Turtle and Screen methods
    - 25.4.2.1. Turtle methods
    - 25.4.2.2. Methods of TurtleScreen/Screen
  - 25.4.3. Methods of RawTurtle/Turtle and corresponding functions
    - 25.4.3.1. Turtle motion
    - 25.4.3.2. Tell Turtle’s state
    - 25.4.3.3. Settings for measurement
    - 25.4.3.4. Pen control
      - 25.4.3.4.1. Drawing state
      - 25.4.3.4.2. Color control
      - 25.4.3.4.3. Filling
      - 25.4.3.4.4. More drawing control
    - 25.4.3.5. Turtle state
      - 25.4.3.5.1. Visibility
      - 25.4.3.5.2. Appearance
    - 25.4.3.6. Using events
    - 25.4.3.7. Special Turtle methods
    - 25.4.3.8. Excursus about the use of compound shapes
  - 25.4.4. Methods of TurtleScreen/Screen and corresponding functions
    - 25.4.4.1. Window control
    - 25.4.4.2. Animation control
    - 25.4.4.3. Using screen events
    - 25.4.4.4. Settings and special methods
    - 25.4.4.5. Methods specific to Screen, not inherited from TurtleScreen
  - 25.4.5. The public classes of the module `turtle`
  - 25.4.6. Help and configuration
    - 25.4.6.1. How to use help
    - 25.4.6.2. Translation of docstrings into different languages
    - 25.4.6.3. How to configure Screen and Turtles
  - 25.4.7. Demo scripts
- 25.5. IDLE
  - 25.5.1. Menus
    - 25.5.1.1. File menu
    - 25.5.1.2. Edit menu
    - 25.5.1.3. Windows menu
    - 25.5.1.4. Debug menu (in the Python Shell window only)
  - 25.5.2. Basic editing and navigation
    - 25.5.2.1. Automatic indentation
    - 25.5.2.2. Python Shell window
  - 25.5.3. Syntax colors
  - 25.5.4. Startup
    - 25.5.4.1. Command line usage
- 25.6. Other Graphical User Interface Packages

### Navigation

- index
- modules |
- next |
- previous |
- Python v2.6.4 documentation »
- The Python Standard Library »