How to get a complete list of Tkinter widgets, methods, properties and possible property values

I understand that most python modules use this “Sphinx” module to generate documentation but I’m literally losing my mind over here. I’ve been learning Tkinter for almost 5 years now and I still don’t know all of the widgets that are available much less the methods and properties for each widget. What am i missing?

1 Like

Tkinter doesn’t actually implement anything itself. It’s an interface to the Tk library for the Tcl language. That’s why the Python documentation isn’t comprehensive, it just explains the differences from Tk. You’ll want to go to the Tk documentation, and look at what’s implemented there. From that translating to the equivalent Python operation isn’t too hard.

Developers use it to create their documentation files (in sophisticated formats like HTML), from some combination of the code’s docstrings and external documentation source (in more developer-useful formats like ReStructured Text). It can’t really help you with understanding someone else’s code.

Well, the starting place for documentation for everything that comes with Python - including Tkinter - is on the website. But if we click through to the page for the tkinter module, it quickly becomes apparent that what you’re really missing is a documentation source for the underlying Tk library (written in C). There’s a big section at the top with a yellow-shaded background offering some recommendations.

We don’t really know what you are missing because we don’t know how much you know, so maybe be a bit more specific to get other answers then just rtm. [1]

That’s actually quite wrong, see the tkinter docs:

Tkinter is not a thin wrapper, but adds a fair amount of its own logic to make the experience more pythonic.

  1. I also don’t see the point in knowing all methods and attributes, because stuff you’ll need often will be on your mind and other things can easily be googled ↩︎

1 Like