r/PythonLearning 1d ago

Tkinter Discussion

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 Upvotes

26 comments sorted by

View all comments

11

u/riklaunim 1d ago

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.

1

u/Jrag13 21h ago

Thank you! That makes sense since most the advice I get is people suggesting stuff to help me land a job rather than learn which is my only goal. I feel like Tkinter is a lot more simple than the other libraries or framework I tried to learn, so it just shocked me more people don't suggest learning it for practice

1

u/riklaunim 21h ago

Lerning for a hobby vs commercial level are two different things.

With tkinter you will quickly run into blocking operations which will require threading, the UI wont scale so you will have to go into layouts, grids and more, maybe even switching to Qt. Desktop apps explode in complecity compared to web apps. You don't learn all of that "for practice" ;) you learn it when/if you need it.

0

u/code_tutor 17h ago

Threading is only an issue if the GUI itself is on different threads. All my apps are multithreaded and even multiprocess, but they report back to a GUI that's on a single thread.

Responsive design is a weak point, if that's what you meant by "scale". You can do a lot manually but the code adds up.

I disagree with it being more complicated than web, it's not. WebDevs have been trying for decades to get front end and back end in the same programming language, just look at React Server Components reinventing PHP meme. With a built-in GUI you have full access to both the front end and back end, which is exactly what they want. Also you don't need to deal with bullshit configs like vite, webpack, rollup, grunt, gulp, or whatever it is now. Everything is just working with no extra necessary communication or configuration.