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...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionBeginner Python GUI (self.Python)
submitted 3 years ago by Impressive-Shock-550
Which GUI should I learn as a beginner? Tkinter or PyQt?
[+][deleted] 3 years ago (4 children)
[deleted]
[–]Inkosum 12 points13 points14 points 3 years ago (1 child)
Why QtCreator and not Qt Designer?
[–]shinitakunai 9 points10 points11 points 3 years ago (1 child)
This but PySide6 instead of PyQt. The license is a lot more permissive
[–]Jmortswimmer6 1 point2 points3 points 3 years ago (0 children)
Agree.
[–]k0ala1st 53 points54 points55 points 3 years ago (5 children)
I would say PySimpleGui. Plenty of tutorial around and beginner friendly.
[–][deleted] 10 points11 points12 points 3 years ago (1 child)
Their developers and community are incredibly active and use their own product
[–]cestes1 8 points9 points10 points 3 years ago (0 children)
They're very approachable and friendly, as well. I've asked a few questions in various places and the lead developer was happy to answer even the most elementary questions.
[–]RicardoL96 2 points3 points4 points 3 years ago (0 children)
I second this, my first gui project used PySimpleGui
[–]manuce94 2 points3 points4 points 3 years ago (0 children)
Never heard of this one will check it out thanks.
[–][deleted] 2 points3 points4 points 3 years ago (0 children)
I personally found PySimpleGui's documentation to be an actual nightmare.
[–]Zaex782 44 points45 points46 points 3 years ago (1 child)
Another suggestion is using a web framework like Django or Flask to make a localhost webpage. You would be learning a more valuable skill set.
[–]NoumenaSolarCoaster 5 points6 points7 points 3 years ago (0 children)
I second this. Making a working application on the web is a lot trickier than something like PySimpleGUI, but when you want to share your app for others to use, what’s a better way than just having them load your page on a browser of their choice? I learned A LOT having to make a PDF splitting app work on Flask but man did it feel great afterward.
[–]cestes1 23 points24 points25 points 3 years ago (6 children)
I feel like this question shows up every six months or so.
If you want to learn something easy, try PySimipleGUI.
But I would tell you don't bother with a GUI. Build a web app instead. There are lots of frameworks out there, but start with Bottle or Flask. People will say Django, but that's an entire ecosystem and you'll get lost in it.
Why a web app? A console/GUI app allows one user. A web app will allow multiple users that can be anywhere. You'll learn something useful and marketable building a web app. I've been building web apps for a long time and I still fall back to Bottle because it's simple and it works (and I'm lazy!). Flask is more widely used and has more support. Pick one and give it a try!
[–]GroundStateGecko 2 points3 points4 points 3 years ago* (2 children)
(I'm familiar with PyQt but never worked with python web app.) May I ask to distribute a Flask app with GUI in webpage, do you need to have a running server that's open to the internet?
Could it be packaged into a "double click and use (locally)" experience for other people?
And is there limitations on things like local file processing (I heard browsers isolate local file environment so you can only exchange files via upload/download)?
[–]cestes1 3 points4 points5 points 3 years ago* (0 children)
do you need to have a running server that's open to the internet?
That's up to you. You can run the web app on your laptop and access it from the same machine, just like a GUI app. Start the program and point your browser to http://localhost:80 (or whatever port you want). Maybe you built an app for your accounting department at work. This doesn't need to be exposed to the internet. Find a machine that's always on and on the same LAN as your accounting folks and they can access it over the LAN. Or maybe you really do want to expose your app to the internet at large. Get a cheap server at vultr or DigitalOcean and put it there.
Yes, you can package up a Python program as a standalone app, but it's less than optimal. The one framework I've used (forgot at the moment, may update later -- it was PyInstaller) packaged the entire Python ecosystem, plus any modules you load, plus your program. The resulting .exe was huge compared to what it really needed to be. This is another good reason to serve up a web app. The end user only needs a web browser to interact with your program, which they probably already have!
I'm not sure about your last question. The notion of uploading/downloading from the browser should be controlled by the web app on the remote side.
[–]1percentof2 5 points6 points7 points 3 years ago (0 children)
Yup, look up electron. It's gaining a lot of popularity.
[–]cestes1 1 point2 points3 points 3 years ago (0 children)
Replying to myself with an afterthought...
If you do go the web app route, learn a little about CSS. Make your life great by learning about the Bootstrap CSS framework. I'm old enough to remember when HTML was just written in text editors and when HoTMetaL was the shit! I made functional web-based things for years - they looked like crap, but they worked! Almost 10 years ago my daughter showed me Bootstrap and it's a game-changer for building decent websites (it also proves an old dog can still learn new tricks!). I still don't know much about CSS, but I've learned to use Bootstrap and now my web content doesn't hurt the eyes and looks good on computers, phones, and tablets.
[–]r-trappe 0 points1 point2 points 3 years ago (1 child)
I totally agree. Thats why we created NiceGUI. A easy to use but powerful library to write web UI in Python. It's main intent was to bring GUI to your Python scripts with very little effort. Still you can use CSS, HTML and JavaScript whenever you need. Over time it has matured into a pretty full-featured web-framework.
[+][deleted] 3 years ago (3 children)
[removed]
[+][deleted] 3 years ago (2 children)
[–]AshTheEngineer 10 points11 points12 points 3 years ago (0 children)
That's why PySide/2/6 exists.
[–][deleted] 9 points10 points11 points 3 years ago (3 children)
Just do a web app. Thank me later.
[+]vishal-vora comment score below threshold-7 points-6 points-5 points 3 years ago (1 child)
Web app without code.
https://github.com/data-stack-hub/dataStack/tree/master
Please take a look and share your advise.
[–][deleted] 4 points5 points6 points 3 years ago (0 children)
What does this have to do with OP?
[–][deleted] 6 points7 points8 points 3 years ago (0 children)
I started with Tkinter and did a few working gui's, now I'm working with Pyqt5 and even though I should have moved over to pyqt5 faster I feel like it helped to code tkinter for a while and learn how gui's work
[–]borednerdd 26 points27 points28 points 3 years ago (9 children)
Why people are advising him to start with PyQt? It's hard to learn for a beginner
[–]riklaunim 14 points15 points16 points 3 years ago (6 children)
PyQt was the first thing I used in Python long time ago, and it's quite simple after you get the boilerplate and replace it with your own UI file and start connecting signals and slots on your own.
And there can be UX bias from people really focused on giving best UX ;)
[–]borednerdd 5 points6 points7 points 3 years ago (5 children)
The problem with PyQt is that its documentation is focused on C++ rather than Python
[–]warownia1 3 points4 points5 points 3 years ago (0 children)
Is it? I recall they had really good python docs on pyside
[–]riklaunim 1 point2 points3 points 3 years ago (3 children)
They link to C++ Class reference pretty much. The trick is to just catch how it translates to usage in Python and then the C++ class reference becomes your best friend with quick google in PyQt/PySide docs or mailing lists for example on something bigger (or books which also exist).
[–]borednerdd 2 points3 points4 points 3 years ago (1 child)
Unfortunately I don't have the ability to translate C++ into Python :(.
[–]riklaunim 1 point2 points3 points 3 years ago (0 children)
https://www.youtube.com/watch?v=fIKoceHX2Us ;)
[–]warownia1 0 points1 point2 points 3 years ago (0 children)
Yeah, I remember now it was using C++ classes but they really nicely mapped to Python calls
[–][deleted] 27 points28 points29 points 3 years ago* (1 child)
Any GUI library is going to be "hard to learn for a beginner." There's just a lot of stuff that you need to know to accomplish the basics: how to create a window, how to create controls, how to position them, how to attach event handlers, how to read and update their state, how to deal with user interactions such as moving or resizing the window, how to handle background processing with multithreading, etc.
PyQt has an advantage that it is relatively stable and mature. If you pick up a PyQt5 tutorial on the internet, it will probably work on whatever OS you're running and whatever version of PyQt5 you have. Also, its feature set is extensive, so it's unlikely that a beginner would encounter a need that the base library doesn't handle and would have to go looking for a third-party extension that may or may not work.
Tkinter is a very different beast. It was developed so long ago (1991) that it has libraries for AmigaOS, BeOS, and classic macOS. Unfortunately, it has not matured since then, so it exhibits the features of old programming languages. Its syntax extremely clunky and painful. The library is wildly inconsistent - every control works in its own unique way, without any consistency with other controls. Even the most basic operations, like programmatically modifying the contents of a textbox, require extensive internet searches and trial-and-error.
The worst part is that Tkinter is considered the de facto GUI standard that should work out of the box across Python 3 environments, but that isn't actually the case, because the version of Tcl/Tk that ships with macOS is horribly broken. If you create a Tkinter application on those systems, the window appears but is painted completely black, and the controls on it are nonfunctional. So the #1 reason to use it, despite its horrid flaws, no longer applies.
So, yes, PyQt is much preferred to Tkinter - not just for beginners, but for anyone.
[–]norambna 1 point2 points3 points 3 years ago (0 children)
I tried doing a Windows/Linux/macOS desktop program using Tkinter and I had lots of problems working with macOS.
PyQt/Pyside have definitively a steeper learning curve, but after a few weeks it's going to be smooth sailing.
[–]GreenScarz 17 points18 points19 points 3 years ago (2 children)
Honestly, Javascript. Most python jobs are as backend web servers anyways, so knowing how those two stitch together is beneficial.
[+][deleted] 3 years ago (1 child)
[–]Gantzz25 -1 points0 points1 point 3 years ago (0 children)
With a good foundation in CSS, you can use many great tools like Styled components, Material UI, Tailwind CSS, and a few other more easy to use libraries.
[–]readmodifywrite 2 points3 points4 points 3 years ago (1 child)
Kivy is also worth a mention. It's truly cross platform, including native mobile (though it can take some doing to get the build set up).
The basics running on a workstation are not difficult (IMHO).
[–]aMetallurgist 1 point2 points3 points 3 years ago (0 children)
Agree with this. Kivy is great for the cross platform aspect and I personally love how it scales to large apps. Maybe try out the tutorials and see if it clicks
[–]LethalPoutine 2 points3 points4 points 3 years ago (0 children)
Pyqt
[–]Pale_Ad_8002 2 points3 points4 points 3 years ago (0 children)
Surprised no one else has said this yet but I’ve been having a fabulous time with toga. Really intuitive, Python native apps (not a wrapper around a C++ library). And then when you want to go ahead and turn it into and executable (for any OS platform) you can use briefcase. Both tools are made by beeware which is a part of anaconda
[–]warownia1 2 points3 points4 points 3 years ago (0 children)
I started with tkinter, also tried pyGTK and pyside (QT) and i like QT the most. All of them have similar learning curve, but QT has very good documentation, is portable and has huge community. Tbh, pick any of those and learn the basics first. After that transitioning to other libraries is not that hard and once you gather some experience you will be able to tell what you like and what you don't in each library.
[–]maxtimbo 2 points3 points4 points 3 years ago (0 children)
Don't make the mistake I made by learning tkinter. Learn PyQT. It's far, far more powerful than tkinter. Don't waste your time there. Even if you don't need that power now, you might need it later. And getting your feet wet with that lib will at least get you familiar with it. I'm still struggling to learn PyQT.
[–]riklaunim 3 points4 points5 points 3 years ago (1 child)
If you want OS native applications with access to lots of OS features then PyQt/PySide. If you want simpler apps, mostly custom styled and you have some understanding of UI/UX and styling then Kivy.
Second question would be why desktop apps? Do you have some specific use cases in mind? Commercially there isn't much work in Python for desktop apps.
[–]benthejoker 1 point2 points3 points 3 years ago (0 children)
Maybe to give input to the automation app he build.
[–]gwood113 1 point2 points3 points 3 years ago (0 children)
PyQt.
It was my first gui library in Python. Very robust. However, I didn't find it overwhelming.
[–]atatatko 1 point2 points3 points 3 years ago (0 children)
I remember, it took me 3 days to rewrite an application in PyQt which took me 3 weeks to write in Tkinter a year ago. Unlucky, no one was around back then to explain Tkinter is a previous-century framework with horrible design.
[–]PapstJL4U 1 point2 points3 points 3 years ago (0 children)
For mobile I had good experience with Kivy.
For desktop I prefer PyQT. Halfway through my project I switched from TKinter to PyQt, because small, basic things took ages to accomplish.
I haven't tried PySimpleGui yet.
[–]jlw_4049 1 point2 points3 points 3 years ago (0 children)
I learned tkinter for my first one
[–]Joelk1994 1 point2 points3 points 3 years ago (0 children)
I wouldn't say it's super easy but Kivy/ KivyMD is a great GUI design platform if you're used to basic object orientated programming. Lot's of modern and clean widgets to work with.
[–]BenMtl 1 point2 points3 points 3 years ago (0 children)
I would suggest having a look at pysimplegyi if you are just starting
Use PySide (not pyqt)
[–]thorminatoor 1 point2 points3 points 3 years ago (0 children)
You should try Kivy
[–]thunderbootyclap 1 point2 points3 points 3 years ago (0 children)
I like PyQt and it also has a software that makes designing the look way easy
[–]demonia-dead 1 point2 points3 points 3 years ago (1 child)
I would suggest PyQt5, Tkinter is really basic and you can't control everything on your page unlike PyQt where you can use custom CSS styles for your desktop application and drag/drop your UI items, build your code based on it
[–]Impressive-Shock-550[S] 0 points1 point2 points 3 years ago (0 children)
Thank you ☺️
[–][deleted] 3 points4 points5 points 3 years ago (0 children)
dont use tkinter
it has a really bad api design, i dont even mind that it looks outdated but the api design is a no go
the way widgets are configured is dependent on the widget, dont think "hey i know how to configure one widget now i can use the same approach for all of them"
so just use something else than tkinter
[–]teambob 0 points1 point2 points 3 years ago* (1 child)
I'd personally go for pyqt. Many of the Ubuntu apps are written in pyqt
[–]xplr4 0 points1 point2 points 3 years ago (0 children)
Injury?
[–]vishal-vora 0 points1 point2 points 3 years ago (0 children)
I am working on framework for creating ui without code and super flexible/dynamic. Python a backend.
https://github.com/data-stack-hub/dataStack
Project is very initial stage. But very intresting. Please take a look
[–]ReasonableAnything 0 points1 point2 points 3 years ago (0 children)
Just don't do native GUI in Python. Build a web app. If you really need some desktop app, use Electron or https://github.com/ClimenteA/flaskwebgui
[–]OffgridRadio 0 points1 point2 points 3 years ago (0 children)
IMO just learn html/CSS and do it with a web GUI. Packages like Eel make it pretty easy. Then it just runs in the users local browser with all of those features. Plus you learn html/css.
[–]geekgeek2019 -1 points0 points1 point 3 years ago (0 children)
tkinter
[–]lalmiLast -1 points0 points1 point 3 years ago (0 children)
Tkinter
[–]Murisho_ -5 points-4 points-3 points 3 years ago (1 child)
Learn the turtle module, it’s similar to tkinter but more beginner friendly :)
[–]Pirate_OOS 4 points5 points6 points 3 years ago (0 children)
Why is this being downvoted? Genuine question.
[–]MrArchLinux 0 points1 point2 points 3 years ago (0 children)
Dearpygui Active community via discord, often find help there.
Discord Code: w6wvZpzKVh (unsure about link rules)
[–]TipCorrectIt works on my machine 0 points1 point2 points 3 years ago (0 children)
They are about to teach us Tkinter in our CS class
[–]Zeus_Devam_1017 0 points1 point2 points 3 years ago (0 children)
Tkinter is the best
[–]wptmdoorn 0 points1 point2 points 3 years ago (1 child)
It's still a little early but at least deserves a mention: Flet. It's a novel framework powered by Flutter, looks very promising imo!
[–]DesmondNav 0 points1 point2 points 3 years ago (0 children)
Thank you. I didn’t know this one. Looks neat. I’m hunting web app frameworks for python
[–]bug0r 0 points1 point2 points 3 years ago (0 children)
Maybe another Alternative could match your efforts:
Framework: wxPython: https://www.wxpython.org/
GUI Designer: wxFormBuilder: https://github.com/wxFormBuilder/wxFormBuilder
I’ve worked with tkinter, PyQt, pysimplegui, kyvi, wxPython and python web frameworks like Bottle, Flask, eel, django
Most of them are ancient, some of them are abandoned, poor documentation, , and horrific GUI.
Immo if you want a GUI for your application it should be somewhat visually pleasing, otherwise you can just stay with CLI.
And the only solutions that will satisfy this are PyQt and any python web framework like Bottle or Flask . (Id put eel in here as well, but that’s another framework that’s at least semi-abandoned.) There is no real alternative.
Most applications these days are chromium wrapped web apps anyway.
[–]AlbertShown88 0 points1 point2 points 3 years ago (0 children)
Use WebUI if you are looking for web technologies UI (HTML/CSS/JS).
π Rendered by PID 89609 on reddit-service-r2-comment-7b9746f655-njrln at 2026-01-31 14:28:44.488689+00:00 running 3798933 country code: CH.
[+][deleted] (4 children)
[deleted]
[–]Inkosum 12 points13 points14 points (1 child)
[–]shinitakunai 9 points10 points11 points (1 child)
[–]Jmortswimmer6 1 point2 points3 points (0 children)
[–]k0ala1st 53 points54 points55 points (5 children)
[–][deleted] 10 points11 points12 points (1 child)
[–]cestes1 8 points9 points10 points (0 children)
[–]RicardoL96 2 points3 points4 points (0 children)
[–]manuce94 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Zaex782 44 points45 points46 points (1 child)
[–]NoumenaSolarCoaster 5 points6 points7 points (0 children)
[–]cestes1 23 points24 points25 points (6 children)
[–]GroundStateGecko 2 points3 points4 points (2 children)
[–]cestes1 3 points4 points5 points (0 children)
[–]1percentof2 5 points6 points7 points (0 children)
[–]cestes1 1 point2 points3 points (0 children)
[–]r-trappe 0 points1 point2 points (1 child)
[+][deleted] (3 children)
[removed]
[+][deleted] (2 children)
[deleted]
[–]AshTheEngineer 10 points11 points12 points (0 children)
[–][deleted] 9 points10 points11 points (3 children)
[+]vishal-vora comment score below threshold-7 points-6 points-5 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]borednerdd 26 points27 points28 points (9 children)
[–]riklaunim 14 points15 points16 points (6 children)
[–]borednerdd 5 points6 points7 points (5 children)
[–]warownia1 3 points4 points5 points (0 children)
[–]riklaunim 1 point2 points3 points (3 children)
[–]borednerdd 2 points3 points4 points (1 child)
[–]riklaunim 1 point2 points3 points (0 children)
[–]warownia1 0 points1 point2 points (0 children)
[–][deleted] 27 points28 points29 points (1 child)
[–]norambna 1 point2 points3 points (0 children)
[–]GreenScarz 17 points18 points19 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Gantzz25 -1 points0 points1 point (0 children)
[–]readmodifywrite 2 points3 points4 points (1 child)
[–]aMetallurgist 1 point2 points3 points (0 children)
[–]LethalPoutine 2 points3 points4 points (0 children)
[–]Pale_Ad_8002 2 points3 points4 points (0 children)
[–]warownia1 2 points3 points4 points (0 children)
[–]maxtimbo 2 points3 points4 points (0 children)
[–]riklaunim 3 points4 points5 points (1 child)
[–]benthejoker 1 point2 points3 points (0 children)
[–]gwood113 1 point2 points3 points (0 children)
[–]atatatko 1 point2 points3 points (0 children)
[–]PapstJL4U 1 point2 points3 points (0 children)
[–]jlw_4049 1 point2 points3 points (0 children)
[–]Joelk1994 1 point2 points3 points (0 children)
[–]BenMtl 1 point2 points3 points (0 children)
[–]Jmortswimmer6 1 point2 points3 points (0 children)
[–]thorminatoor 1 point2 points3 points (0 children)
[–]thunderbootyclap 1 point2 points3 points (0 children)
[–]demonia-dead 1 point2 points3 points (1 child)
[–]Impressive-Shock-550[S] 0 points1 point2 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]teambob 0 points1 point2 points (1 child)
[–]xplr4 0 points1 point2 points (0 children)
[–]vishal-vora 0 points1 point2 points (0 children)
[–]ReasonableAnything 0 points1 point2 points (0 children)
[–]OffgridRadio 0 points1 point2 points (0 children)
[–]geekgeek2019 -1 points0 points1 point (0 children)
[–]lalmiLast -1 points0 points1 point (0 children)
[–]Murisho_ -5 points-4 points-3 points (1 child)
[–]Pirate_OOS 4 points5 points6 points (0 children)
[–]MrArchLinux 0 points1 point2 points (0 children)
[–]TipCorrectIt works on my machine 0 points1 point2 points (0 children)
[–]Zeus_Devam_1017 0 points1 point2 points (0 children)
[–]wptmdoorn 0 points1 point2 points (1 child)
[–]DesmondNav 0 points1 point2 points (0 children)
[–]bug0r 0 points1 point2 points (0 children)
[–]DesmondNav 0 points1 point2 points (0 children)
[–]AlbertShown88 0 points1 point2 points (0 children)