120 points · by amasad · 8y ago · 47 comments
https://repl.it/talk/share/Python-GUI-Tic-Tac-Toe/6145 (might not take the HN load tho)
The reason we started looking into it is that we have a lot of users wanting[1] to write GUI apps and although we support all the major Python web frameworks[2], users, especially novices, still find it easier to write native GUIs. And I can't blame them, after you've learned a bit of Python, learning to write web apps is a whole new ballgame (HTML and CSS are a different style of code altogether that warps people's minds at first).
Here is a basic demo that renders a plot (using matplotlib) if you want to fork and play around with it: https://repl.it/@amasad/remi-repl-demo
How does remi compare to https://github.com/flexxui/flexx?
For example, flexx can translate parts of the app to JS to have a more reactive experience.
At first glance the use cases seem different (applications vs dashboards) but they both provide widgets and GUI elements. Are there things that would be much simpler/quicker in one vs the other?
It's good to only code GUI in one language, but it's kind of unavoidable that you still need to learn html and css (even javascript) if you want to more control and customization.
- Shiny have some html tag functions to make it really flexible to construct html.
- You can customize css by adding your own.
- Shiny support adminLTE dashboard and bootstrap styles, DataTables js library, interaction with plot and DataTables.
I have seen some applications like this, but they fail to check the origin header.
So if listening on localhost to provide a GUI on the users desktop, is it not meant to be protected from attacks from the web?
I'm building an app using Bottle as the framework and getting HTTPS to work properly (with a proper certificate) has been a nightmare. I think I fixed it after a full day of research and tinkering yesterday.
This app is super small... maybe 5 users simultaneously, so I don't need the overkill of Django or integrating with something on Apache or Nginx.
REMI looks pretty straightforward and lightweight; even without HTTPS it looks useful... I'll give it a whirl and keep it in my bag of tricks!
- Security, most WSGI servers are not designed to handle bad actors like intentionally slow clients. It is usually trivial for a client to DoS your application.
- Separation of concerns, letting your framework focus on its core job rather than pilling features related to crypto and certificate renewal.
The fact that you struggled getting HTTPS to work probably means that you were heading the wrong direction. I suggest to take a look at Caddy[0]. It is a small, handles HTTPS automatically and is super easy to put in front of a Python application.
Bottle is great if you have a simple use case... but getting HTTPS going was horrible. I can't count how many back-end engines I tried (cherrypi, paste, cheroot, gevent, waitress, etc.). Finally got it working on gunicorn.
I'd love to find a framework that abstracts all this away so I don't have to think about it...
Just because at some point they did GitHub releases doesn't mean they still do, especially when the installation instructions only mention other channels.
We see Davide helping people on our forums and fixing bugs as they come.
I wish it was easier to find the signal on, "is this project abandonned?" "Does it still work?"