Splitting off from PySimpleGUI now requires a (paid) license. Opinions? because I want this to be a positive and general discussion without getting bogged down in “PySimpleGUI did nothing wrong” vs “PySimpleGUI is evil” discussions that are likely inevitable.
What GUI libraries for Python do people have personal experience with? What are the advantages and disadvantages? I’ll start off, but I don’t have experience with many.
Tkinter has the rather huge advantage of being part of the stdlib, but it’s a bit clunky. Never really enjoyed working with it but it has its place.
PyGObject (GTK) is quite decent. Tends towards the verbose at times but that might be fixed with a simple wrapper. Overall been fairly happy withi t.
That’s literally all I’ve used (not counting older GTK-based things that have now been deprecated in favour of PyGObject). Which others do people know?
You’ve inspired me to look back at the first Python code I ever wrote 13 years ago, back when Python 2 was a reasonable choice. I made heavy use of:
matplotlib.widgets
As a curve ball, I was recently delighted to run pure Python packages in Pyodide in a web browser. So, if I needed a desktop app these days I’d use Tauri, and running Python on a side car. Embedding External Binaries | Tauri Apps
My (few and crude) Python GUI interfaces I use tkinter. It’s in the
stdlib and works on multiple platforms. It is simple. You can roll your
own widgets built on top of it. (I saw TkInterMapView
just yesterday, amazing.)
I tried PySimpleGUI a few years because as with HTML, I hate layout. It
had some nice stuff. But (as of a few years ago) it had the following
downsides:
the various backends were independently maintained parallel
implementations of the widget set with no common inherited ABC classes
to keep them sane and synced - some widgets had different APIs
depending on the backend
I couldn’t do dynamic stuff (insert/remove widgets on the fly) - it
suits only fixed layouts. I was writing a Tagger GUI to help me manage
files, and needed to render eg file tags in a sidebar etc. Simply
impossible in PySimpleGUI.
I used PyQt5, 6, PySide, PySide2, all layers on the Qt widget set. I did
not enjoy it. Qt has the advantages cites elsewhere: like Tk, works on
several platforms, and does have a lot of solid widgets. But:
I found myself lost in a sea of Python libraries: which to use? PyQt
or PySide? The 5/6 is basicly Qt 5 vs Qt 6, so that’s ok.
ill discipline in widget use (my naive fiddle a widget from another
thread, always wrong) actually caused a segfault at some point
(presumably races inside the C/C++ side of things)
I was trying to built a standalone app for a client with this using
py2applet, and getting the libraries includes was a nightmare; i never
really figured it out, but it basicly meant even when I had it working
the app couldn’t just be copied to another Mac and just work.
I know it’s possible to bind everything in an app, that’s one of the
cool things about them, but never got it working well.
So for my needs, I use tkinter.
I an not a front end developer and the experiences above reflect that.