# Tkinter documentation external links outdated?

**URL:** <https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356>\
**Category:** Python Help\
**Tags:** help\
**Created:** [October 16, 2023, 12:24pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356 "2023-10-16T12:24:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juandev](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/juandev/32/14555_2.png) [@Juandev](https://discuss.python.org/u/Juandev)\
**Post date:** [October 16, 2023, 12:24pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/1 "2023-10-16T12:24:15Z")

</div>

I am still lost in finding official documentation or documentation on a certain thing. You often recommend going to Python docs on this website, but even this documentation may not be official, may not include everything, and may include links to obsolete texts. So for example [tkinter in docs.python.org](https://docs.python.org/3/library/tkinter.html?highlight=tkinter#module-tkinter) points out “This documentation will concentrate on these additions and changes, and refer to the official Tcl/Tk documentation for details that are unchanged.” Going there I can find links to 20 year old book. Is it still valid? Or I could search in their glossaries or Index, but again, how do I find something specific (in this case method get(), if I don’t know where to look for it (so for example in which section of their indices)? There is no “complete” one-page documentation of Tkinter or Python?

---

<div class="post-metadata">

**Author:** ![smontanaro](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/smontanaro/32/1389_2.png) [@smontanaro](https://discuss.python.org/u/smontanaro)\
**Post date:** [October 16, 2023, 1:28pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/2 "2023-10-16T13:28:38Z")

</div>

If possible, when you find a documentation problem like this, please file a [bug report](https://github.com/python/cpython/issues). External sites change and move around. Those changes aren’t always noticed.

In this case, the official Tcl/Tk docs can be found [here](https://www.tcl.tk/doc/).

Edit: I assume by “twenty year old book” I assume you’re referring to Mark Lutz’s book. There might well be newer books (or more recent editions of Mark’s book), but I think the trend is to refer more often to online resources. I’ll open an issue about it.

---

<div class="post-metadata">

**Author:** ![Slurms\_MacKenzie](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/slurms_mackenzie/32/9163_2.png) [@Slurms\_MacKenzie](https://discuss.python.org/u/Slurms_MacKenzie)\
**Post date:** [October 16, 2023, 2:04pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/3 "2023-10-16T14:04:13Z")

</div>

Unfortunately the Python tkinter documentation assumes the reader is already familiar with Tcl/Tk and only really divulges what is required for an experienced Tcl/Tk user to use it as a wrapper. I found it pretty hard to get my head around at first as one has to figure out how the native Tcl/Tk syntax is converted into tkinters object oriented style.

From memory, it boils down to this (others feel free to correct if I’m wrong): in Tcl/Tk widgets are referenced using their ‘path’, namely a string describing the path one would take down through the widget heirachy in order to reach the referenced widget, starting with the root window (always denoted using a period ‘.’) and ending with the referenced widget.

A path is then followed by a command that operates on the chosen widget, which is then followed by options, etc. Native Tcl/Tk looks, to me anyway, much more like a command line interface you’d use with a shell like BASH.

However, the tkinter way of doing things is to use an object oriented approach. So, Instead of referencing widgets using a path, it provides classes that can be used to create objects that represent Tk widgets; instantiating a widget’s class returns an object that represents an instance of that widget, and also creates the corresponding widget for your GUI application. You then use the methods of that object to operate on the widget.

The key thing to note is that in tkinter, widgets are represented by their object instead of a path, and we operate on them using methods, not commands. This means that you can go to the official Tcl/Tk documentation and look up a command, and there is a good chance that command is implemented in tkinter, either as a method (in the case of commands that _operate_ on widgets) or as a class (in the case of commands that _create_ widgets).

> [@Juandev](#):
>
> Going there I can find links to 20 year old book. Is it still valid?

I’m not 100% sure but it sounds like you’ve found your way to the [TkDocs tutorial](https://tkdocs.com/tutorial/index.html), which is very good and what I used to learn tkinter, but it’s not a reference manual. This is the [official Tk reference](https://www.tcl.tk/man/tcl8.7/TkCmd/index.html). It’s a bit of a slog when you’re not used to reading it and coming from the Python side of things, but bear in mind how Tcl/Tk semantics are expressed using tkinter and you can work it out.

---

<div class="post-metadata">

**Author:** ![Stefan2](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/stefan2/32/18492_2.png) [@Stefan2](https://discuss.python.org/u/Stefan2)\
**Post date:** [October 16, 2023, 3:31pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/4 "2023-10-16T15:31:31Z")

</div>

> [@Juandev](#):
>
> 20 year old book. Is it still valid?

Which one? None of the four I see there is that old.

---

<div class="post-metadata">

**Author:** ![smontanaro](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/smontanaro/32/1389_2.png) [@smontanaro](https://discuss.python.org/u/smontanaro)\
**Post date:** [October 16, 2023, 4:16pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/5 "2023-10-16T16:16:31Z")

</div>

> [@Stefan2](#):
>
> None of the four I see there is that old.

I assumed the OP was referring to Mark Lutz’s book, but that’s only about 12 years old, and the tag line on the cover seems to indicate Python 3 coverage. (Still, Python 3 has a bunch of changes since the early Python 3 days.)

The Ousterhout book (last item) was published in 2009. I wonder if it’s still current.

---

<div class="post-metadata">

**Author:** ![Juandev](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/juandev/32/14555_2.png) [@Juandev](https://discuss.python.org/u/Juandev)\
**Post date:** [October 17, 2023, 6:35am UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/6 "2023-10-17T06:35:28Z")

</div>

> [@Stefan2](#):
>
> Which one? None of the four I see there is that old.

I am sorry, 23 years old: [Python and Tkinter programming](https://www.amazon.com/Python-Tkinter-Programming-John-Grayson/dp/1884777813/ref=sr_1_10?crid=1T9XUFDOER9I0&keywords=tkinter&qid=1697524442&sprefix=tkinte%2Caps%2C198&sr=8-10).

---

<div class="post-metadata">

**Author:** ![hugovk](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hugovk/32/14505_2.png) [@hugovk](https://discuss.python.org/u/hugovk)\
**Post date:** [November 28, 2023, 8:46am UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/7 "2023-11-28T08:46:02Z")

</div>

This links to _Python and Tkinter Programming_ by John Grayson, published in 2000.

But the [docs](https://docs.python.org/3/library/tkinter.html) link to:

> - [Python and Tkinter Programming](https://www.packtpub.com/product/python-gui-programming-with-tkinter/9781788835886)  
> By Alan Moore. (ISBN 978-1788835886)

There’s a mistake here. This Moore book is really called _Python GUI programming with Tkinter_, and was published in 2018. I’ve opened a [PR to fix the docs](https://github.com/python/cpython/pull/112490).

---

<div class="post-metadata">

**Author:** ![Stefan2](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/stefan2/32/18492_2.png) [@Stefan2](https://discuss.python.org/u/Stefan2)\
**Post date:** [November 28, 2023, 6:27pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/8 "2023-11-28T18:27:57Z")

</div>

Actually they said:

> "… refer to the official Tcl/Tk documentation …” **Going there** I can find links to 20 year old book.

So I think they do mean that very old book, but the link wasn’t on the Python page but somewhere in the Tcl/Tk doc that the Python page links to.

(Using the Tcl/Tk site’s search function to search “tkinter” gives me [this page](https://wiki.tcl-lang.org/page/Tkinter) as the top result, which links to that very old book by Grayson.)

---

<div class="post-metadata">

**Author:** ![Juandev](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/juandev/32/14555_2.png) [@Juandev](https://discuss.python.org/u/Juandev)\
**Post date:** [January 2, 2024, 2:41pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/9 "2024-01-02T14:41:13Z")

</div>

Is it a good idea to change the title of this discussion? Yes, we have moved towards links, but the original idea was about the overall structure of the documentation - i.e. on [python.org](http://python.org) is not everythink.

---

<div class="post-metadata">

**Author:** ![MegaIng](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/megaing/32/16162_2.png) [@MegaIng](https://discuss.python.org/u/MegaIng)\
**Post date:** [January 2, 2024, 3:11pm UTC](https://discuss.python.org/t/tkinter-documentation-external-links-outdated/36356/10 "2024-01-02T15:11:55Z")

</div>

[docs.python.org](http://docs.python.org) is the official documentation. It might not be complete, but that is something to be fixed with improvement PRs. Your original post clearly focuses on tkinters docs, which as pointed out are not quite optimal. If you want to make a general point, you should use more than one example.
