26
votes

I am looking for a complete online reference for Python's tkinter module. I've tried to find one by myself, but for some reason I can't.

To clarify, I am not looking for a tutorial. Instead, I would like to have a reference for all the available classes and attributes.

For example, if I write this code:

from tkinter import *
root = Tk()
root.title("My title")

I wonder: what optional arguments does the Tk class accept for instantiation? What are properties and methods for a Tk object? What arguments does title accept? And so on...

"Look at the source" is not an answer to this question, obviously.

4

4 Answers

8
votes

For a definitive guide to all of the options supported by each widget you should consult the tcl/tk documentation. It's a fairly trivial mental exercise to translate the tcl into python. The only real problems are when the tcl options conflict with python reserved words (such as the -in option for pack and grid)

5
votes

There were 2 books that were very useful to me:

They are very complete. They might be hard to find online.

4
votes

I'm adding an alternative answer by myself:

I could just use pydoc to have the complete module reference.

2
votes

Some links no longer function - lately I've been relying on effbot for all my tkinter documentation needs.