TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Python GUIs

130 pointsby giladalmost 2 years ago

24 comments

BlackLotus89almost 2 years ago
I sometimes miss the good old days of visual basic and delphi when I could create a gui that just worked in seconds, help pages via F1 and quick access to all events possible through simple gui clicks.<p>A few days ago I tried getting a simple PyQtWebengine example working using pyqt6 and failed miserably. It was a frustrating experience for sure
评论 #36331767 未加载
评论 #36333761 未加载
评论 #36336470 未加载
评论 #36332703 未加载
评论 #36331782 未加载
评论 #36331563 未加载
评论 #36339396 未加载
torstenvlalmost 2 years ago
I&#x27;m a big fan of using wxPython instead of Qt or the other recommendations in OP.<p><a href="https:&#x2F;&#x2F;www.wxpython.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.wxpython.org&#x2F;</a><p>wxWidgets is mostly licensed under an LGPL analog with linking exceptions intended to permit distributing binaries under any license you choose. No part of wxWidgets, including wxPython, has a license more restrictive than the LGPL.
评论 #36331281 未加载
zzzeekalmost 2 years ago
for Python GUIs (or &quot;TUIs&quot;, or &quot;a screen with colorful buttons and controls I can use with the mouse or keyboard but NOT a &quot;GUI&quot; &quot; if that helps some of the responders to get through the day) I recommend considering a console-based GUI using the excellent Textual: <a href="https:&#x2F;&#x2F;textual.textualize.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;textual.textualize.io&#x2F;</a><p>this is the most modern GUI (in a console or not) framework you&#x27;ll find for Python right now.
评论 #36335553 未加载
评论 #36330879 未加载
评论 #36331084 未加载
评论 #36331992 未加载
mikewarotalmost 2 years ago
I lost a year of time on a side-project because of WxPython, I built a shim to allow me to make small tweaks without having to regenerate the python code, and it was <i>barely</i> usable.... then I had to change a list to a drop-down (I think), and it broke everything.<p>I threw all of that time away, and had it all working in Lazarus&#x2F;Free Pascal in less than 2 weeks.<p>Most web based programmers have no clue how badly &quot;modern&quot; tools are compared to the VB6&#x2F;Delphi era. Everything is worse, except for GIT... GIT is brilliant.<p>---<p>Also, my personal wiki of choice is WikidPad, which is distributed as an executable for windows, and works just fine. I can&#x27;t move to Linux, because it&#x27;s distributed as source there, and WxWindows made a breaking change to one of their key parameters to dialog function calls, so none of the dialogs work properly, though it does show text. It&#x27;s effectively read-only and broken as a result.
评论 #36336674 未加载
F00Fbugalmost 2 years ago
For vanilla applications PySimpleGUI is so easy to use: <a href="https:&#x2F;&#x2F;www.pysimplegui.org&#x2F;en&#x2F;latest&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.pysimplegui.org&#x2F;en&#x2F;latest&#x2F;</a><p>Personally, if I&#x27;m writing software that needs to talk to a human I&#x27;ll just build a web interface instead of a GUI.
mahoalmost 2 years ago
I love gooey: <a href="https:&#x2F;&#x2F;github.com&#x2F;chriskiehl&#x2F;Gooey">https:&#x2F;&#x2F;github.com&#x2F;chriskiehl&#x2F;Gooey</a><p>It allows me to quickly slap a GUI on an existing script that accepts command-line-arguments. In the end, I get the best of both world: Discoverability from the GUI, automation through the script, and automatic feature parity between the two.<p>Downside: Control over the GUI layout is basic, and only &quot;standard&quot; GUI features work, but I never felt limited when using it.
评论 #36332778 未加载
评论 #36334805 未加载
okasakialmost 2 years ago
I tried to use GTK for a little project at work and I couldn&#x27;t figure out how to make it look decent.<p>I ended up making a flask app and launching a browser. It seemed to be 100x easier.<p>I would prefer to make native GUI apps but it&#x27;s just so much more difficult.
评论 #36331506 未加载
评论 #36331245 未加载
nologic01almost 2 years ago
It would be nice to have a canonical python GUI framework. Something modern and elegant and flexible. With an intuitive declarative description, quick for simple things but progressivly enhanceable for more complex things. With a friendly license and an active community sharing components, themes or whatever. Reasonanly performant and ideally cross-platform.<p>All the options fall short somehow, but guess what, its not much better in any other language. The GUI problem is not truly solved.
评论 #36333466 未加载
pacifikaalmost 2 years ago
The problem remains delivering the app to the customer in my experience, unless something like flatpak can be used cross platform.<p>Unless picking a solution from the start and testing it throughout, I find that the most challenging.
评论 #36331233 未加载
评论 #36333392 未加载
评论 #36336285 未加载
评论 #36332187 未加载
spapas82almost 2 years ago
I think that tkinter is &quot;good enough&quot; for most cases that need a GUI in pythonb these days (for more complex stuff you&#x27;d better go with either a web app or a compiled language that creates normal desktop apps).<p>As a showcase I&#x27;ve built two simple utils with python and tk (and pyinstaller):<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;spapas&#x2F;pdfmerger">https:&#x2F;&#x2F;github.com&#x2F;spapas&#x2F;pdfmerger</a> a simple tool to merge pdfs into one<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;spapas&#x2F;pomo">https:&#x2F;&#x2F;github.com&#x2F;spapas&#x2F;pomo</a> ; a simple pomodoro timer
评论 #36339508 未加载
at_a_removealmost 2 years ago
I used wxPython many, many years ago on a foolish project. I am sure it has matured.<p>But as always, I turn to PEP 20, in particular &quot;There should be one-- and preferably only one --obvious way to do it.&quot; Batteries <i>ought</i> to be included. I&#x27;m hardly a language designer, but more and more I care less about things like syntax and such, and more about having as much as possible already built out, so I can focus on the particulars of a problem, rather than having to endure a &quot;evaluate a bunch of alternatives&quot; phase for each little thing.<p>It&#x27;s a tall order, and a growing one, but I think whatever the next big language is, it will have that kind of focus.
评论 #36333617 未加载
galoisscobialmost 2 years ago
Is it just me or do most python GUI options have ugly UI and seem to lack polish?
评论 #36332492 未加载
keithalewisalmost 2 years ago
My guilty secret is to use Excel for my quick and dirty GUIs. I wrote a library to make that easy if you know C++. <a href="https:&#x2F;&#x2F;github.com&#x2F;xlladdins&#x2F;xll">https:&#x2F;&#x2F;github.com&#x2F;xlladdins&#x2F;xll</a>. People already know how to use Excel so I don&#x27;t have to start from scratch
crawsomealmost 2 years ago
PyQT&#x27;s license is not ideal, and that&#x27;s why Pyside exists.<p><a href="https:&#x2F;&#x2F;www.pythonguis.com&#x2F;faq&#x2F;pyqt-vs-pyside&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.pythonguis.com&#x2F;faq&#x2F;pyqt-vs-pyside&#x2F;</a>
atomizealmost 2 years ago
I&#x27;ve been coming in and out of the Python ecosystem for years as it isn&#x27;t my primary tool but often is a piece of a project or something along those lines. Is it just my limited exposure, or is there a sort of stagnated, low-key &#x27;GUI lib cold-war&#x27; going on in the Python space?<p>Many libraries, and framework-type things seem to have come and gone, while none have really &#x27;taken hold&#x27;, so to say. Is this the case? And, specifically, what is the big hurdle to a widely accepted GUI library in Python?
LoganDarkalmost 2 years ago
Nobody has recommended prompt_toolkit (TUI only) yet, so here I go:<p><a href="https:&#x2F;&#x2F;python-prompt-toolkit.readthedocs.io&#x2F;en&#x2F;master&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;python-prompt-toolkit.readthedocs.io&#x2F;en&#x2F;master&#x2F;</a><p>I&#x27;m working on an interface for an LLM (large language model), and prompt_toolkit seems to be the only library with enough text-buffer features for me to implement everything I want.<p>It&#x27;s quite imperative-feeling though. Have to keep references to individual widgets if you want to do anything with them later.
评论 #36335850 未加载
nrjamesalmost 2 years ago
I&#x27;ll piggyback here for a related question: I need to build some simple UI on top of a few Snowflake tables, to support a small group of users and their quality assurance tasks. Essentially, they verify important metadata and need to fix it in the Snowflake tables when it is incorrect.<p>Ideally, I can build that with Python. I was thinking of DRF and React (since things like Retool are out of the question) but I&#x27;m open to any framework&#x2F;stack. What is the most simple way to accomplish and maintain this?
评论 #36331631 未加载
评论 #36331683 未加载
alfiopuglisialmost 2 years ago
Shameless plug for my own python GUI toolkit: guietta! <a href="http:&#x2F;&#x2F;guietta.readthedocs.io&#x2F;en&#x2F;latest&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;guietta.readthedocs.io&#x2F;en&#x2F;latest&#x2F;</a><p>It is built on top of PyQt5. But be <i>very</i> careful if you use conda, because conda decided to rename the PyQt5 packages, resulting in near-irrecoverable env crashes if conda and pip are mixed. In that case, make sure to use conda-forge to install.
justinmayeralmost 2 years ago
A interesting option I haven’t seen mentioned here is Beeware, an open-source (MIT) project with this summary:<p>“Write your apps in Python and release them on iOS, Android, Windows, MacOS, Linux, Web, and tvOS using rich, native user interfaces. Multiple apps, one codebase, with a fully native user experience on every platform.”<p>Source: &lt;<a href="https:&#x2F;&#x2F;beeware.org" rel="nofollow noreferrer">https:&#x2F;&#x2F;beeware.org</a>&gt;
hwaynealmost 2 years ago
The guide lists four different GUI frameworks and the comments (so far!) have listed two more.* None of them really have claim to being the good &quot;default&quot; (except maaaaaaaaybe tkinter) and all of the &quot;GUI-knowledge&quot; is fragmented across them. I like Python but whenever I have to make a GUI, I shy away.<p>* Between starting and finishing this comment, someone brought up a third. Now we&#x27;re up to seven!
评论 #36331078 未加载
评论 #36331195 未加载
Case_of_Mondaysalmost 2 years ago
I have been looking at Python GUI libraries&#x2F;frameworks&#x2F;services over the past &gt; 1 year. I&#x27;ll cut straight to the chase with my recommendations for what they are worth.<p>- NiceGUI <a href="https:&#x2F;&#x2F;nicegui.io&#x2F;#features" rel="nofollow noreferrer">https:&#x2F;&#x2F;nicegui.io&#x2F;#features</a> - my favorite of the bunch, essentially wraps Quasar Vue components with accessible python. Tons of features including SPA, FastAPI under the hood, TailwindCSS. Have used it on a few projects and started contributing recently.<p>- Streamlit <a href="https:&#x2F;&#x2F;streamlit.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;streamlit.io&#x2F;</a> - if your goal is to get some python code set up with a GUI and deployed ASAP this is the best option. I have gone from 0 to a full working app in like an hour for some projects. Lots of love for it. A bit limited in terms of full-scale applications and large backend databases but it actually holds up really well.<p>There are a lot of other ones that people regularly recommend.<p>- Gradio <a href="https:&#x2F;&#x2F;gradio.app&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;gradio.app&#x2F;</a> - really popular with huggingface and ml folks. Similar to streamlit in that it sacrifices some level of depth for speed of standing up projects.<p>- Textual <a href="https:&#x2F;&#x2F;www.textualize.io&#x2F;projects&#x2F;#textual" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.textualize.io&#x2F;projects&#x2F;#textual</a> - Building text-based UIs for the console. Seems to be pretty popular on reddit... Not to be a hater, but I have never seen a good argument for why it&#x27;s worth dumping a bunch of time into this versus a web-oriented framework. They say &quot;it&#x27;s useful for products that don&#x27;t need the internet&quot;, &quot;you can use it through ssh&quot;, etc... doesn&#x27;t really fit with my needs, I&#x27;ll just leave it at that.<p>- Anvil <a href="https:&#x2F;&#x2F;anvil.works&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;anvil.works&#x2F;</a> - a &quot;low code&quot; option for building python GUIs. I am pretty impressed, it has integrated databasing and a lot of plugins. If you are aiming for a scalable application for a large number of users this is probably a good options. My personal gripe with it is the number of mouse clicks it takes to do stuff but that could also be my lack of experience with the tool.<p>- Plotly dash <a href="https:&#x2F;&#x2F;dash.plotly.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;dash.plotly.com&#x2F;</a> - not usually thought of as a full GUI library necessarily but they have options for deploying the dashboards to the web - and the overall look and feel is nice. A good option if you have a small notebook with plots that needs wider accessibility.<p>My use cases are typically 10 - 50 users in an enterprise setting, so accessibility&#x2F;low barrier to entry (pretty much meaning web-based) are concerns of mine. I also lean toward wanting to avoid learning overly-opinionated libraries (I put Qt and tkinter into this category). Why spend 50 hours learning Qt&#x27;s way of building an app when I could use something like NiceGUI which lets you build a nicer looking app and gets you familiar with web dev concepts in the process. Imo a better use of my time.
评论 #36335605 未加载
taffitalmost 2 years ago
Anyone has some experience with Kivy [1]? It seems that it checks off some of my requirements, like cross-platform, supporting touch interfaces, ease of development, allows complex&#x2F;fancy UIs as well, etc.<p>[1] <a href="https:&#x2F;&#x2F;kivy.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;kivy.org&#x2F;</a>
minimaxiralmost 2 years ago
Many of the Python GUIs here are GPLv3, which unfortunately makes them a nonstarter in a lot of projects.
评论 #36331451 未加载
dist-epochalmost 2 years ago
The best Python GUI, Electron, is missing from this page.
评论 #36332764 未加载