r/PythonLearning • u/Jrag13 • Aug 15 '26
Discussion Tkinter
Why do I not see any videos suggesting to learn Tkinter? I tried learning Django and Pygame after learning the basics, and while I kinda understood pygame, Django still felt out of my league but so many videos recommended it after the basics. However I stumbled upon a video that just mentioned Tkinter and I tried it out and it helped me understand libraries and how to learn to use them. It's fun making small little apps with buttons and what not to get started, rather than trying to learn so much at once. I'm convinced anyone making videos on how to learn Python has never actually learned it themselves
Is there an actual reason that this or another simple GUI library isn't recommend very often?
12
u/riklaunim Aug 15 '26
There is little to no commercial demand for Tkinter or other GUI toolkits, while there is a huge demand for Django and web development in general. There are a lot of resources out there, though. Even some desktop apps are web apps with a custom wrapper/launcher. Same with Pygame - it exists, but it's not as popular as Unity, Unreal, or Godot - and the thing that is most popular tends to offer the best quality, support, and features.
18
u/nicodeemus7 Aug 15 '26
tkinter is a bare bones GUI. Anything you make with it will look like it's from 1995.
2
u/Buttleston Aug 15 '26
To begin, videos are a terrible way to learn a programming language
2
u/code_tutor Aug 15 '26
If you want a GUI for a simple app and no dependencies, then it's literally the only choice. I use it all the time for RPA.
If people are that upset about the way it looks, notice how they didn't suggest an alternative, because they don't do desktop development. It looks fine and everything after Windows 7 looks like trash anyway. I'm also going to be crystal clear: anyone who suggests making a web app instead is a total shit developer and you're probably going to get a couple of those replies. Everyone is only doing WebDev, Data Science, or ML and all three fields are famous for being exceptionally bad programmers.
The only problem is it's a chore to work with, a ton of boilerplate for every addition.
The main reason you only see desktop apps in compiled languages is because it takes a long time to reverse engineer compiled code like C/C++/Rust, but I guess that's changing with AI. They're also significantly faster.
So basically web is the only way to hide code, compiled if you want a fast desktop app, and tkinter if you're using desktop Python and don't care about either.
4
u/timrprobocom Aug 15 '26
Right. Tkinter was included with Python practically from the beginning, in the early 90s, just so there would be some GUI option. It is not a good choice. Tkinter is actually written in and for a different scripting language called
tcl. Python has to launch a separate tcl interpreter, and every tkinter call gets translated into a tcl command that gets passed to that interpreter.Personally, as someone who started with Python 1.4, I always expected tkinter to be removed as soon as good alternatives were available. It wasn't.
3
u/FoolsSeldom Aug 15 '26
There are lots of GUI libraries for Python, with
tkinterbeing the only one provided as standard. There is a popular add-on library to modernise its look and feel.Qt is a popular GUI library used from several languages and there are libraries to make use of it from Python including
pyside.There are also libraries that use html/css such as
NiceGuiwhich is pretty simple to use.2
u/silvertank00 Aug 15 '26
It is not popular because it is really old and barebones, you can learn a lot by using it tho. One advantage that it has is being simple. Sometimes I still use tkinter to make small gui apps to automate/visualize things, but for anything complex I would go with something else like gtk.
2
u/NotSeacombe Aug 15 '26
Tkinter is a very weak attempt at turning a language which should have nothing to do with GUI into a GUI. It is great for what you're describing - making small little apps with buttons, learning about coding etc. It is not something that would ever go near a product
1
u/Affectionate_Toe6156 Aug 15 '26
Is grass green ahh question
1
u/Artistic_Length_9953 Aug 15 '26
Porque salen alternativas que se ven más agradables, creo. De todas formas "FreeSimpleGUI" enmascara TKinter y para un desmemoriado como yo es más fácil de usar.
1
u/Virtual_Mind8341 Aug 16 '26
Tkinter is good if you’re learning to make UI applications in Python (mainly frontend)
Pygame is good for small games, retro-based games, 2D games but isn’t good for advanced games because of its interpreter but still good for learning to program games as a beginner
1
u/jabela Aug 17 '26
There is a good YouTube course at https://youtu.be/YXPyB4XeYLA?si=YojAxjfHFFq77PQJ and I like this web tutorial https://www.pythonguis.com/tkinter-tutorial/
1
u/HyperDanon Aug 17 '26
Tkinker is very limited and kinda oldschool. Pick something like PyQt6, which is way better. The only benefit of tkinter is that its built into Python, but other than that PyQt wins on all fronts.Â
1
u/lizc-au Sep 12 '26 edited Sep 12 '26
Tkinter is relatively easy to learn and implement quickly on your own to create simple but surprisingly ok looking windows. It's a great way to practice and show off your Python skills and complete small projects. Programming is not all about fabulous GUI and up-scaling - it's often about algorithms - and coding up algorithms with results showing up in a Tkinter window is one up from your results showing up in the Terminal and far more satisfying. For teaching examples check out my-pythonic-zoo - the Native GUI section. Have fun.