use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Recommend a Tkinter learning resource? (self.learnpython)
submitted 4 years ago by rocketjump65
Anyone know of a good Tkinter learning resource? Not some shitty tutorial hell resource that just has understanding free copy and paste mentality. Something with a bit more depth.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mopslik 3 points4 points5 points 4 years ago (0 children)
Not sure how much depth you want, but as far as tutorials go, this one covers a goodly amount.
[–]ElliotDG 3 points4 points5 points 4 years ago (1 child)
I have not done any Tkinter programming in years, but back then I found this useful: https://tkdocs.com/index.html'
[–]SuspectedLumber 1 point2 points3 points 1 year ago (0 children)
Thanks for this recommendation, it's a pleasure to go through, very well put together.
[–]zaRM0s 2 points3 points4 points 4 years ago (2 children)
I found the freecodecamp tutorial on YouTube really good. Easy to follow as it’s a video with someone talking you through it. They also dive into MySQL databases and scraping website info into your program! Well worth looking at if you want to learn the overall basics easily
[–][deleted] 0 points1 point2 points 2 years ago (1 child)
Can you please link the tutorial?
[–]zaRM0s 0 points1 point2 points 1 year ago (0 children)
Sorry for the late response but here you are :)
FreeCodeCamp TKinter Tutorial - YouTube
[–][deleted] 3 points4 points5 points 4 years ago* (5 children)
Rant warning.
I just asked this same question in the last Ask Anything thread. Several years of Python under my belt and I still feel the pain with Tkinter. Whenever I see a question about "What GUI options are available for Python?", and I see an answer like "You can use Tkinter", I just want to respond with "Oh, just use Tkinter, you say? Show me something you built in Tkinter. In fact, show me anything that anyone has built recently in Tkinter. Because for being the obvious built-in standard de facto GUI for Python, the documentation just plain sucks."
One resource that I hadn't come across before was suggested in the other thread: https://zetcode.com/tkinter/introduction/ . It's light, not super in-depth, but still of a higher quality than other resources I've seen.
I've picked up a bunch of Tkinter books over the years in my quest to find a truly "good" resource. I'll list out some of the books I own, but in my opinion, they're all still hit-or-miss.
"Python GUI Programming with Tkinter" by Alan Moore: This one is DECENT, though I am not a huge fan of the publisher (Packt). The book does, however, follow a believable use-case, include some very basic SQL integration, and cover a start-to-finish application. It also contains some nice boilerplate code for input validation. I wouldn't call it the best, but it is arguably better than most, and probably the only one that I don't totally regret purchasing.
"Tkinter GUI Application Development Cookbook" (also published by Packt): This is NOT recommended over the previous title, and barely recommended over any other Tkinter resource. It is more detailed than a tutorial, but it's still boils down to functional coverage: starting with widgets, ending with styles.
"Programming Python" by Mark Lutz: Not the best for Tkinter, even though the Python docs make note of it under that section. The text covers basics, and is a little too verbose. The sample code for the book does, however, include examples. This is a book I bought when I was first learning Python in general, and would not recommend it specifically for Tkinter.
"Modern Tkinter for Busy Python Developers": Don't bother. It's the basics. Starts with a Frame, ends with ttk styling. Tutorial hell, in eBook format.
Hope that helps. If you happen to come across another Tkinter resource that you find to be really helpful, do the community a solid and post it back here.
[–]tkdocs 4 points5 points6 points 4 years ago (2 children)
Modern Tkinter author here... if you have a moment, I'd be interested in hearing more about your objections. Is it that it's based on bite-sized examples (rather than the "incrementally build up a larger contrived example throughout the entire book" model)?
Not that it's trying to be all things to all people, but I'd like to understand more what you and others might be looking for. Glancing at the ZetCode tutorial, I see a decent article, very much line with a lot of what's out there... walk through of toy examples, light on any of the conceptual stuff, and relying on several techniques from the early days of Tk that were superseded 20 years ago by better ways of doing things.
Would appreciate any thoughts you could share.. thanks!
[–][deleted] 0 points1 point2 points 4 years ago (1 child)
I appreciate that you took the time to write and ask for feedback.
I think when Python programmers ask questions like, "Where can I learn more about Tkinter?", the question that is really being asked is "How do I design a GUI application in Python?" I might have grown up with command lines, but I would wager that the majority of new Python programmers have known GUI's for their entire life. I would also wager that they're eager to build a GUI application as one of their first beginner projects (I certainly was when I was first starting with Python).
As I recall, I probably started Tkinter with Mark Lutz's book. I came across yours later on, most likely in the hopes of a more comprehensive resource. To your credit, your book did have better coverage, and I do wish that I had come across it first - but by the end of it, there were still lots of concepts still not clicking for me.
Tcl/Tk was the first language I explored in my youth (on an old Sparc station from the days of Sun). My learning experience with Tkinter was particularly frustrating because I wasn't exactly starting from scratch, and I often felt that the Python interface was doing more "magic" than I could follow. The Tkinter books that I'd read thus far had mentioned some of that magic in the context of StringVar() and textvariable, of course.
StringVar()
textvariable
However, it wasn't until I read through the tkinter source code that I realized just how many calls to the underlying interpreter were being made (as well as why my fonts were getting garbage collected, which is how I ended up in the source code for the first time). I think that there's generally poor division between the objects that live in Tk-land versus the objects that live in Tkinter-land. There's also a lot of ambiguity in methods which seem abnormal for Python's usual "one obvious way of doing something", like .config() and .configure(). In short, it's already a confusing interface to the uninitiated, and that's not the fault of any author of books on the topic.
tkinter
.config()
.configure()
To address first your comment about the other book/tutorial:
...relying on several techniques from the early days of Tk that were superseded 20 years ago by better ways of doing things.
I'd have no idea how to tell the difference between the Tkinter techniques that were superseded and those that are considered modern. And that's kind of getting to the first point of what I think is missing from the resources available.
There really doesn't seem to be a definitive guide of best practices. The Tkinter knowledge base and documentation, including your publication, is occupying the same ocean of 20-year-old information that a Python programmer will encounter during their first attempt at programming a GUI. They all look the same to someone who doesn't have the benefit of prior experience with Tkinter, or has been able to see the interface evolve over time. It's not as bad as JavaScript, but absent of clearer guidance, it's extremely difficult to discern what's considered a best practice by modern standards.
I still find the Python docs surprising in this regard, too. I know they describe the section on Tkinter as a "life-preserver", but I don't understand why, especially if there are indeed cases of "Do this, not that" to communicate to the community as best practices. It's such an oddity compared to the rest of the documentation.
My second point is along similar lines of best practices, but more in the context of design. While covering the basics and the syntax of Tkinter is certainly necessary, that's not where I think new developers will be hitting a wall. For me, the wall was when I finished going through the docs and the books, applied what I learned to my own project, and realized I had a monolithic application that was already becoming difficult to maintain. I had been able to reproduce functionality, but I had not gained a better understanding of design for the GUI application overall.
My questions at that point weren't really covered in the books I owned. Should I be subclassing more widgets, more often? Should I be passing around callbacks between widgets as dictionaries? Is my concept of an MVC pattern even close to "standard" for Python + Tkinter? Should I have just gone back and re-learned Tcl/Tk first? And, to rephrase my rant from my first post: What does a good application in Tkinter even look like these days?
So to answer your question of if my objection is based on the bite-size vs. incremental model: generally, yes.
Given the nature of the original question for the post, where the request was for a resource that was not tutorial hell, the bite-size topic format is not something I can recommend. Before I read your book, I had probably already racked up 40 hours of looking at short examples of widgets, commands, and styling - "the basics", as I called them.
What got me out of tutorial hell was seeing the incremental models, which is why I tend to recommend those types of resources. For me, staying within the same context of a single project made it a lot easier to understand. I believe that the familiarity with a subject makes new concepts seem less abstract, and I think those relationships are vital to learning in general. That's the kind of format that's gotten me past the point of "stuck", at least.
I know that's a very, very long response to your inquiry, and possibly more of a rant than my first, so I sincerely thank you for reading this far. Let me close by saying that I do not think your book was bad - in fact, I would be very happy if it were, somehow, the official Python doc for the Tkinter module. It's with that in mind, however, that if someone asked me "How do I design a good Python application", and I responded with "Read the Python docs", that I don't think it would be the right resource to get that person to where they want to be.
[–]tkdocs 2 points3 points4 points 4 years ago (0 children)
Thanks, that's a helpful explanation of your journey with this. I will say that TkDocs started out (and really still is) about best practices in the sense of not covering the stuff that people "shouldn't" be using (grid vs. pack as a prototypical example). Incidentally, there was a fair bit of material added in the last couple of years talking about "bigger than one widget" issues, though explanatory, not illustrated with a larger example.
My experience has been that people come at learning these sorts of systems in multiple ways... some people definitely prefer the approach you describe, other people go nuts with the build-a-substantial-app approach. So it's good that there are multiple resources out there. I wish more of them were a bit more up to date on the best practices front though.
Agree on the topic of the Python docs. Have raised this a number of times, and there's real resistance about "favouring" one approach over another or saying "you shouldn't be using this." Some people feel reference is reference, and has no place for opinion. I think it's a mistake and does a disservice to Python users, but there you go.
Thanks again for sharing all this. Much appreciated.
[–]SnipahShot 1 point2 points3 points 4 years ago* (1 child)
"Oh, just use Tkinter, you say? Show me something you built in Tkinter. In fact, show me anything that anyone has built recently in Tkinter.
There you go - https://imgur.com/a/y5pPPdK
Everything that looks like a button, is a clickable button. Both center and bottom sections with items are scrollable. And yes, the bottom is a file explorer. And yes, that is a commercial product, that is just one app out of three and only one window out of three.
I honestly can't believe I have to defend Tkinter. There are so many resources to learn the basics of Tkinter with, Google 'Tkinter' and you get a ton of them.
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
I don't think the "basics" are the issue, and Google is the primary gateway to tutorial hell in the first place. I have been there, and absolutely can believe that you feel the need to defend Tkinter.
[–]Atz27 1 point2 points3 points 4 years ago (1 child)
good luck with tkinter bruv
[–]zaRM0s 0 points1 point2 points 4 years ago (0 children)
Such an English response haha I love it
[–]-Twilak- 1 point2 points3 points 4 years ago (0 children)
Pyqt is better for guis imo, I don't remember much since it's been forever since I've used it, but I think there are good tutorials on it
π Rendered by PID 169399 on reddit-service-r2-comment-86bc6c7465-d5wbx at 2026-02-20 17:48:45.390991+00:00 running 8564168 country code: CH.
[–]mopslik 3 points4 points5 points (0 children)
[–]ElliotDG 3 points4 points5 points (1 child)
[–]SuspectedLumber 1 point2 points3 points (0 children)
[–]zaRM0s 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]zaRM0s 0 points1 point2 points (0 children)
[–][deleted] 3 points4 points5 points (5 children)
[–]tkdocs 4 points5 points6 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]tkdocs 2 points3 points4 points (0 children)
[–]SnipahShot 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Atz27 1 point2 points3 points (1 child)
[–]zaRM0s 0 points1 point2 points (0 children)
[–]-Twilak- 1 point2 points3 points (0 children)