Live data from Hacker News

PysimpleGUI

github.com

41–50 of 159 posts

Re: PysimpleGUI

#41

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

There's a few projects that can package a python environment into a single executable (the main tradeoff is you end up including a copy of python with every single executable if you have lots of tools) - when I wanted it to create an installer (.msi/.dmg), I've found cx_Freeze came the closest to "it just works".

Re: PysimpleGUI

#42
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!).

Re: PysimpleGUI

#43
post #20

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.

As another user suggested, Lazarus is worth of consideration, although for a more VB-like experience, Gambas might be interesting too.

https://www.lazarus-ide.org/

https://gambas.sourceforge.net/en/main.html

Re: PysimpleGUI

#44

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

Pyinstaller just works.

Re: PysimpleGUI

#45
post #21

Earlier quoted context omitted.

Look at Handbrake, which is a glorified UI for ffmpeg for example.

I use both handbrake GUI and yt-dlp GUI. Here's something they both do horribly and I would suggest for any CLI tool with a GUI wrapper: have a persistent textarea at the bottom of the GUI that shows the equivalent CLI call to the settings I select in real time. This will teach the user how your tool works and also give GUI-only users a taste of the power they could have if they used the command line. So basically, t…

A hybrid would be great indeed, Bret Victor style with interactive widgets for each CLI argument. Might be a fun side project one day.

Re: PysimpleGUI

#46

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…

Chess engines are a good reference for this. The decision-making part is a CLI that plugs into a GUI like WinBoard[0] or Arena[1]. There’s a protocol the engine and GUI follow, such as the WinBoard or UCI[2] protocols, which just exchange text commands via STDIN/STDOUT.

The main challenges are the same problems you’d run into with multithreading, like deadlock where the GUI and CLI are both waiting on the other. So both sides typically need to be running their I/O in a separate thread from the “business logic”, so both sides remain responsive.

A second common issue is idiosyncrasies around each OS’s handling of pipes, things like making sure you flush the buffer, or just the different OS-level API calls that differ between Linux, Mac, and Windows.

[0] http://hgm.nubati.net/

[1] http://www.playwitharena.de/

[2] https://gist.github.com/DOBRO/2592c6dad754ba67e6dcaec8c90165...

Re: PysimpleGUI

#47
post #21

Earlier quoted context omitted.

Look at Handbrake, which is a glorified UI for ffmpeg for example.

I use both handbrake GUI and yt-dlp GUI. Here's something they both do horribly and I would suggest for any CLI tool with a GUI wrapper: have a persistent textarea at the bottom of the GUI that shows the equivalent CLI call to the settings I select in real time. This will teach the user how your tool works and also give GUI-only users a taste of the power they could have if they used the command line. So basically, t…

This is a really good idea, and I can't believe it didn't occur to me with my PowerShell tooling background, since a lot of them have been doing this for a long time.

Re: PysimpleGUI

#48
post #16
post #6

In 2023 isnt it almost always better to make a webapp through dash or something if you need a “gui”?

...but why?

I've got one very convincing reason: distribution. Having a web app makes it:

* usable on pretty much any platform

* easy to distribute/update

* easily trustworthy/jailed (no need to install something that might access your data)

It makes me sad, but as far as I can see, there is no serious alternative for universal+jailed apps.

Re: PysimpleGUI

#49
post #34

Earlier quoted context omitted.

What does “a Python app” even look like?

I wouldn't want it to be clear it was made with Python with some vey Python-y library that makes things look a certain way. I want the app to look modern in a way that it could have been written in C# for all the user knows.

I wrote a Python app with a Tkinter GUI for a customer. You can’t tell it’s written in Python or Tkinter as long as you change the default icon.

I’ve encountered a few vendor apps over the years, like data collector apps, that I noticed were written in Python with Tkinter. The only way I knew was they hadn’t changed the default Tkinter icon.

Re: PysimpleGUI

#50
post #35

Earlier quoted context omitted.

I have used PySide6: https://pypi.org/project/PySide6/ Looks fine, works fine, API matches the C++ docs... slightly unpythonic at times but at least it's well documented.

What is the sales pitch over PyQt? What's the difference? It seems it's more just direct bindings to Qt?

They seem to be largely compatible in terms of the API, so the main difference is the license I think (PySide is LGPL, while PyQt is GPL).
Post reply on HN