22
Simple FOSS GUI for Python (lemmy.mindoki.com)

Hello all!

I'm looking for a simple to use GUI for my FOSS python project.

I have tried tkinter which is, uh, usable but seriously oldish? Good point seems to be it's basically inbuilt in python so not hard to distribute.

PyQt is on the heavy end, I just need windows, scrollbars and buttons (basically, see below), also I wonder about the license of Qt (it's always a PITA when trying to do C++ Qt) and also what you must package when you distribute the soft.

Must haves:

  • Frames (I need two independent lists of files and another with global info)
  • Text, buttons & colors, an "open file" dialog. Editable text field.
  • Scrollable lists, with clickable icons (ex. "Filename [Delete icon] [Update icon]")
  • Async behaviour (so that a thread can update one part when it sees fit)
  • Works on most popular Linux
  • FOSS (I don't want to change everything when the soft dies, or be on the enshittification ride)

Nice to have :

  • Possibility to make pop out windows (like a settings manager)
  • Mac & Win support

Cheers and thank you!

top 20 comments
sorted by: hot top controversial new old
[-] adjjjj@lemmy.world 7 points 6 months ago

I always used wxwidgets for small stuff. Another option is gtk (pygobject) but that is slightly more annoying to work with.

[-] Valmond@lemmy.mindoki.com 2 points 6 months ago* (last edited 6 months ago)

Will check out, thanks!

Why is pygobject annoying? Is it complex code, large stuff to install or something along those lines or is it just "annoying"?

[-] englislanguage@lemmy.sdf.org 2 points 6 months ago

With Gtk, I have seen some issues with rarely used parts of the API, but that should not be relevant to your rather simple use case.

[-] Valmond@lemmy.mindoki.com 2 points 6 months ago

On the road with wxwidgets Phoenix!

Thanks a lot!

[-] lukecooperatus@lemmy.ml 5 points 6 months ago

I've historically used PySide (the free-license version of Qt) but for simple stuff like you're looking for, you might get some mileage out of the Toga GUI toolkit. It's relatively new, but promising.

I've actually been pretty impressed with the whole suite of BeeWare stuff in my informal testing so far; it's a nice little bundle of tools. (Specifically I'm interested most in their distribution approach; building Python apps for distribution is a giant fucking pain, but this group seems to have improved the experience significantly.)

[-] Valmond@lemmy.mindoki.com 1 points 6 months ago

Thank you, but they both seems to be not very used? I could find some information but really not very much.L Like how to make tabs :-)

[-] lukecooperatus@lemmy.ml 1 points 6 months ago

I haven't used it much myself, it could be too early in it's development to be useful, just thought I'd mention it though!

It looks like tabs are supported, but they call them an OptionContainer.

It seems like one sacrifices a lot of customizability for simplicity of code with this toolkit, but that might be fine for some use-cases.

[-] nossaquesapao@lemmy.eco.br 5 points 6 months ago

If your only problem with tkinter are the looks there are some theme extensions that can make it look more modern, like ttk bootstrap

[-] Valmond@lemmy.mindoki.com 1 points 6 months ago

It does look oldish (too) I was thinking about the code 😅

[-] manicdave@feddit.uk 4 points 6 months ago* (last edited 6 months ago)

I don't know if this something you're deliberately trying to avoid. Apologies if you are, and I've missed the point, but

I gave up on doing anything in TK years ago. For all the effort to make stuff work in it, you might as well just use flask and have a HTML frontend. That way, you know it's going to work on everything and includes remote access as a bonus.

Edit: for a lot more power with a little bit more learning curve, look at fastapi.

[-] Valmond@lemmy.mindoki.com 1 points 6 months ago

Yeah TK is so old in all ways... only upside is it's like bundled with Python.

[-] irmoz@lemmy.world 3 points 6 months ago* (last edited 6 months ago)
[-] Valmond@lemmy.mindoki.com 2 points 6 months ago* (last edited 6 months ago)

I don't mind paying but all that corporate stuff always tend to end up as dead code or enshittifyed.

I mean I checked it out and it looks great, but there is no open source, right?

[-] irmoz@lemmy.world 3 points 6 months ago* (last edited 6 months ago)

Idk about any need for payment, I just installed it with PIP and started using it right away

[-] JSens1998@lemmy.ml 1 points 6 months ago* (last edited 6 months ago)

It use to be open source. When they launched V5 this year, they decided to take down V4 and make the project closed source. You can still find forked repos of V4 on github that can be used freely.

[-] milkisklim@lemm.ee 2 points 6 months ago

Would Streamlit work for what you're looking for?

[-] ArtVandelay@lemmy.world 2 points 6 months ago

I love streamlit!

[-] Valmond@lemmy.mindoki.com 1 points 6 months ago

No native tabs it seems, what a shame looks very nice.

[-] filtoid@lemmy.ml 1 points 6 months ago

I'm only mentioning this because it's not been mentioned in any other comments but there is a Python implementation for the CEF (Chrome Embedded Framework). It let's you write your front end in HTML/CSS and JS while letting you call back to a Python backend. You can use any existing JS framework to do your styling (offering the most flexibility) while keeping business logic in Python. It's not exactly what you were asking for, however you mentioned in a different comment thread that tkinter looked outdated, so thought I'd mention it.

Link here https://github.com/cztomczak/cefpython

[-] trite_kitten@lemm.ee -3 points 6 months ago

Your issue is that you’re trying to use Python. ;)

this post was submitted on 30 May 2024
22 points (95.8% liked)

Asklemmy

43965 readers
1411 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy 🔍

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS