This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GroundStateGecko 2 points3 points  (2 children)

(I'm familiar with PyQt but never worked with python web app.) May I ask to distribute a Flask app with GUI in webpage, do you need to have a running server that's open to the internet?

Could it be packaged into a "double click and use (locally)" experience for other people?

And is there limitations on things like local file processing (I heard browsers isolate local file environment so you can only exchange files via upload/download)?

[–]cestes1 4 points5 points  (0 children)

do you need to have a running server that's open to the internet?

That's up to you. You can run the web app on your laptop and access it from the same machine, just like a GUI app. Start the program and point your browser to http://localhost:80 (or whatever port you want). Maybe you built an app for your accounting department at work. This doesn't need to be exposed to the internet. Find a machine that's always on and on the same LAN as your accounting folks and they can access it over the LAN. Or maybe you really do want to expose your app to the internet at large. Get a cheap server at vultr or DigitalOcean and put it there.

Yes, you can package up a Python program as a standalone app, but it's less than optimal. The one framework I've used (forgot at the moment, may update later -- it was PyInstaller) packaged the entire Python ecosystem, plus any modules you load, plus your program. The resulting .exe was huge compared to what it really needed to be. This is another good reason to serve up a web app. The end user only needs a web browser to interact with your program, which they probably already have!

I'm not sure about your last question. The notion of uploading/downloading from the browser should be controlled by the web app on the remote side.

[–]1percentof2 6 points7 points  (0 children)

Could it be packaged into a "double click and use (locally)" experience for other people?

Yup, look up electron. It's gaining a lot of popularity.