[Python-ideas] A GUI for beginners and experts alike
Brice Parent
contact at brice.xyz
Fri Aug 24 03:34:47 EDT 2018
>
> The execution of this code, depends on PySimpleGUI, which in turn
> depends on tkinter, which is in turn a thin layer on top of Tcl/Tk.
> And Tcl/Tk provides the GUI layer.
> (See https://docs.python.org/3/library/tk.html.)
>
> I'm suggest that sometimes it may be better to use HTML5 to provide
> the GUI layer. I pointed to Elm, to show how powerful HTML5 has become.
>
> Put another way, I'm suggesting that instead of
> > import PySimpleGUI as sg
>
> we are able to use
> > import HtmlSimpleGUI as sg
>
> for a module HtmlSimpleGUI that, sadly, hasn't been written yet!
>
> However, mine is just one voice, and I have little more to say. If you
> don't mind, I'll leave this conversation now.
For me, it would even make more sense to split the project into two parts:
- the description library, which could roughly enable the syntax you
propose (but with another import) to define what your interface should
look like.
- rendering plugins to display the form in specific formats/type of
displays. So you would have a tkinter (or whatever) plugin for a simple
GUI, an bottle/html plugin (for example) to display your interface in a
web browser, a plugin with a mix of those two to display the html form
in a webview component, a plugin to display the form on a tiny touch
enabled screen attached to your raspberry pi's GPIO pins or to your
micropython module, etc. And if it makes sense (you didn't use any form
element that is not compatible with a text-only display), a plugin to
display your form in the CLI.
This would allow to detach the content from the presentation, and allow
to make a project evolve depending on the needs without having to
rewrite everything.
-Brice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180824/e845b41f/attachment.html>
More information about the Python-ideas
mailing list