开发者

Where can I find API documentation for tkinter?

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.


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)


There were 2 books that were very useful to me:

  • Mark Roseman's Modern Tkinter for Busy Python Programmers

  • John Grayson's Python and Tkinter Programming.

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


I'm adding an alternative answer by myself:

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜