[ Next: A Simple Hello World Program ]

Tkinter Life Preserver

Contents

Introduction

Tkinter is a Python interface to the Tk GUI toolkit. This document is not designed to be an exhaustive tutorial on either Tk or Tkinter. Rather, it is intended as a stop gap, providing some introductory orientation on the system. Hopefully, it will also help to answer programmers questions, when they need something more useful than ``read the source code.''

This manual assumes that you are familiar with the Python programming language and that you have access to the Tk toolkit man pages.

Credits

How To Use This Manual

This manual is designed in two parts: the first half (roughly) covers background material, while the second half can be taken to the keyboard as a handy reference.

When trying to answer questions of the form ``how do I do blah'', it is often best to find out how to do "blah" in straight Tk, and then convert this back into the corresponding Tkinter call. Steen Lumholt has done an admirable job in keeping the correspondence between Tk and Tkinter close, so that Python programmers can often guess at the correct Python command by looking at the Tk documentation. This means that in order to use Tkinter, you will have to know a little bit about Tk. This document can't fulfill that role, so the best we can do is point you to the best documentation that exists. Here are some hints: