PysimpleGUI
We had a work requirement to start logging hours in Jira. I hated having the website open, it was slow to find the Jira I was working on, find the link for logging hours and adding a comment. I wanted a desktop app that had a list of issues assigned to me with buttons to add comments and work log hours.
I messed with Tkinter but was struggling for awhile just getting it to look…nice. I stumbled on PySimpleGUI and suddenly I was flying. Setup the hooks to the Jira api and I had what I wanted. Was a great project to learn UI development.
I'm really, really excited about these GUI frameworks. Native desktop experience is so much better than web-view amalgamations. And kudos to PySimpleGUI for the simplified event loop, and multi-backend approach, that is genuinely new.
I do wonder why don't we see more "automatic" GUIs: given some data structures and functions, make a passable interface to interact with them. Use heuristics to pick when a panel should be vertically or horizontally laid out, or placed in a tabbed interface, or a popup, etc. It would unlock a lot of functionality that is too nested for CLI and too "native" for web apps.
The examples look straight up taken from the 90s esthetically [0]. Don’t get me wrong, for prototyping/internal tools that need a GUI to be usable by people not tech savvy enough to use a CLI it’s perfect, but what about the cases where you want things to look good?
While native UI are always best for performance etc, I’ve always found them harder to style than a webpage.
What is the equivalent of components (listed of styled components that go together) in python GUI? Something like for Flutter or SwiftUI, that look slick without much effort.
[0] https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/ma...
Looks good. I have a suggestion for it, although it might be this library is too mature for such a dramatic change: use dictionaries (which, as of a recent Python, remember which order the elements were inserted) instead of lists.
I did something like that in an old job, except it was a much thinner wrapper around PyQt (and surprisingly little code). A key difference is that setting properties/signals and nesting widgets was done together. One benefit of that over setting properties in the constructor is that, if you need a name for a widget (e.g., to set the text later), you can still set the properties of it in the main bulk of the view.
The "setup_view" function was the whole API. They talked about opening sourcing it as part of something else – I hope they do because I found it really handy for quickly knocking together simple GUIs. But this library looks like a good alternative, so thanks for posting.self.mytext = QTextEdit() view = { "title": "My Window Title", QVBoxLayout(): { self.mytext: { "text": "Initial text", }, QPushButton(): { "text": "copy from self.mytext", "clicked": self.copy_text, } } } setup_view(self, view)
Well, it's starting to get close to the ease of use of VB6 or Delphi/Lazarus. Progress is definitely being made, now they just need an interactive GUI builder, so you can just #import the forms you make, the Bob's your Uncle.
---
I lost a boatload of time on a project trying to get WxPython and WxFormBuilder to work together years back... any little change in the forms broke everything in the backend. I finally wrote a little shim that mated everything up, until I had to change a fields Type, and it broke everything. It appears that won't be the case here. (Thank goodness!)
As a developer for a Python GUI application [1], I think the biggest problem with using Python for desktop applications is the packaging. All existing tooling for creating a distributable binary either stops working or starts to require nontrivial hacks once you have more than a few dependencies. Even popular packages have issues. You get cryptic missing hidden import problems and missing data files that you didn't know were ever needed. Some dynamic module loading also stops working once they are brought outside of the normal python environment, which is the case if you use PyInstaller or cx_freeze. I'm not sure what can really be done here. Maybe Python needs to propose a standardized way to package standalone programs like Java's jars that only depends on the interpreter.
I kinda prefer CustomTKinter, which has a much elegant and material theme-like look. Supports light/dark theme as per system on windows/Linux/MacOS.
I'm surprised that nothing has filled the void that VB6 left behind in the rapid application development space. The language wasn't great, but VB6's strength was the drag and drop GUI builder.
I'm considering taking a tool I have which has a pretty nicely fleshed-out CLI interface and wrapping a GUI around it, so people who don't run desktop Linux can use it too. This seems like it might be perfect for my needs.
https://github.com/hiAndrewQuinn/finstem
Mostly I'm wondering whether anyone else has ever done what I'm trying to do here. My tool has well defined CSV, TSV and JSON flags -- has anyone else ever tried to use an actual full CLI tool unchanged to build a GUI around? What challenges should I be ready to face?
I have one comment, and I hope it's not rude: There is too much text. Everywhere where you can put text, the author put a lot of it. Sentence after sentence, rambling on. Coherently so, most of the time, sure, but just one after the other and not a single relevant screenshot for the first thousand words.
Something is not right here. Either this is a joung enthusiastic coder, which is probably the case, or there is so much text in order to convince you to try it.
The readme even has an about me section where the author introduces himself.
For some examples, scroll to random points in the readme and read a few paragraphs, then repeat what you just read.
I worked with a non-software team that used this to build a UI about two years ago. It’s great to spin up something quickly, and worked well for a team that didn’t have much UI experience - to a point. It becomes very hard to maintain and navigate as soon as any complexity comes in - much harder than Qt, Winforms, or Swing. The styling was lackluster. Maybe it’s improved in that time, but I think its place is quick one-off UIs and rapid prototyping.
Does anyone have experience with this? The goal to lower the entry bar for GUI development seems laudable to me, wonder where the solution stops to work, though.
> Supported frameworks include tkinter, Qt, WxPython, or Remi. The term "wrapper" is sometimes used for these kinds of packages.
Other than the support for web UIs, this seems like Java AWT but for Python. It presumably has the 'lowest common denominator' problem of supporting only those widgets which are available in all the wrapped GUI toolkits.
For desktop UI work, why not just use Qt's official Python bindings? Qt has good cross-platform support, and its Python API seems very approachable.
https://doc.qt.io/qtforpython-6/quickstart.html#create-a-sim...
Since some comments point out that the design looks old: I agree.
However, the framework’s author describes the usecase as building simple UIs for what otherwise would be used via the command line or for building UIs for cases when people can't or don’t want to learn a more complex framework (this could include HTML/CSS/JS, which is quite complex, if you do not know it yet!).
Why can't we design a GUI using GUI in 2023? I need to see which is which on the screen man!
I once made a simple serial monitor GUI with this. It's really easy to use, and has better defaults than vanilla tkinter.
However, as soon as I discovered VS Code's serial monitor plugin I abandoned my project.
I wrote a very simple Python gui tool and posted it a few months ago:
What's the solution for shipping a desktop Python app these days? I use Python a lot for small internal tools and always land up having to ship it as part of a web service and build a web UI for it so staff can use it as "set up conda, install the deps and run python ... " doesn't fly
In 2023 isnt it almost always better to make a webapp through dash or something if you need a “gui”?
Related:
Python GUIs for Humans – Transforms UI into People-Friendly Pythonic Interfaces - https://news.ycombinator.com/item?id=28600922 - Sept 2021 (43 comments)
Wouldn't a HTML-like (DOM) interface be even more simple?
What is the recommended modern way to write GUIs in Python? Assume I'm in Python 3.12 and have a Poetry project as my management solution and that I have general software and GUI experience. What do I use? My application might have lots of streaming data to be plotted, streaming images to be displayed, lots of buttons and other elements. Is it PyQt6 with PyQtGraph? I don't want it to look like a Python app.
I like this part:
>> Want to share your PySimpleGUI program with friends and family that don't have Python installed on their computer? Try the GUI front-end for PyInstaller that you'll find in the psgcompiler project.
Visual Basic is that you??
I love this project. Enough said, we need more of this approach to software development. Software dev is about helping people solve problems.
This looks cool and seems about on par with Tcl/Tk w.r.t. rapid GUI prototyping.
RebolView ??
PyGTK is not hard to use. ChatGPT can help you generate an app.
I really wish this had a more modern default style
From https://github.com/PySimpleGUI/PySimpleGUI/issues/142
> 2023 is going to be the "Make or Break" year. I ultimately need to determine if the project is going to continue. To date, it's nowhere near sustainable. The income doesn't cover the cost of the project, meaning that it's not only unable to allow me to pay for my cost of living, but I continue to rack up debt, borrowing money, to keep the project functional.
> This isn't new information if you've followed the over 1,200 announcements I've made since Sept 2018. The data is available should you wish to look at the GitHub Sponsorships and do the simple math required to calculate income from Udemy. It would be great for the project to keep going. I'm hopeful, but more than hope's required to keep the project going.
So if you like this project and want to see it around in the future, please support it.
Github sponsors is probably the best place: https://github.com/sponsors/PySimpleGUI
[dead]
[flagged]
[flagged]