Live data from Hacker News

Python GUIs

pythonguis.com

21–30 of 98 posts

Re: Python GUIs

#23
post #9

I tried to use GTK for a little project at work and I couldn't figure out how to make it look decent. I ended up making a flask app and launching a browser. It seemed to be 100x easier. I would prefer to make native GUI apps but it's just so much more difficult.

My suggestion for people experimenting with GTK these days is to take a look at the examples that are being built into "gtk workbench".

Re: Python GUIs

#24

Many of the Python GUIs here are GPLv3, which unfortunately makes them a nonstarter in a lot of projects.

Why should anyone care about that? If you want to sell something and keep it all to yourself, then go buy something. Qt will happily sell you a quite nice resellable component. If you want to reshare that which you got for free yourself, great, no problem there either. Say what exactly is the problem that isn't either of those two situations out loud.

The problem is when you want to create a tool for internal company usage.

Re: Python GUIs

#25
post #10
post #7

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 "default" (except maaaaaaaaybe tkinter) and all of the "GUI-knowledge" is fragmented across them. I like Python but whenever I have to make a GUI, I shy away. * Between starting and finishing this comment, someone brought up a third. Now we're up to seven!

Well I haven't seen anyone mention Flet, which is pleasant (if maybe not all that complete) if you have Dart/Flutter experience, so increment your counter at least one. :-) https://flet.dev/

First time I've seen this, looks really cool! Thanks for sharing it!

Re: Python GUIs

#26
post #16

I'm a big fan of using wxPython instead of Qt or the other recommendations in OP. https://www.wxpython.org/ 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.

I have tried wxWidgets and wxPython, and while there are many nice features, my issue with it has always been that its behavior is inconsistent across platforms. I have found Qt to be much better at delivering the same experience across platforms. Using PySide 2 with the previous version of Qt (Qt 5 instead of the current Qt 6) avoids any licensing issues since PySide 2 uses the LGPL version of Qt 5.

> my issue with it has always been that its behavior is inconsistent across platforms

Isn't that because different platforms are different? This should be a feature. "Cross-platform that feels native", because each platform has a different definition of "native".

IME wxWidgets was always better than Qt or any other of the high-level piles of bloat. For example, its layout system would actually use the platform-native, rendered sizes of components, instead of the native components only being a skin over a secret other layer that has its own input handling (looking at you, Qt/GTK).

Re: Python GUIs

#27

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. A few days ago I tried getting a simple PyQtWebengine example working using pyqt6 and failed miserably. It was a frustrating experience for sure

Making a GUI these days that isn't based on HTML and CSS in some way is an... experience.

Re: Python GUIs

#28

Earlier quoted context omitted.

Why should anyone care about that? If you want to sell something and keep it all to yourself, then go buy something. Qt will happily sell you a quite nice resellable component. If you want to reshare that which you got for free yourself, great, no problem there either. Say what exactly is the problem that isn't either of those two situations out loud.

The problem is when you want to create a tool for internal company usage.

If you don't distribute it publicly, you don't need to distribute the source: https://www.gnu.org/licenses/gpl-faq.en.html#NoDistributionR...

Re: Python GUIs

#29
post #19

I'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. 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'm ope…

Drop React, just go with pure DRF or Flask and use a nice JavaScript library for table edition (https://datatables.net/).

Re: Python GUIs

#30
post #19

I'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. 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'm ope…

Your description loudly shouts Streamlit to me. The fact that streamlit is owned by Snowflake is just the cherry on the topy, if anything :)

You may want to have a look at https://streamlit.io/gallery

Post reply on HN