Python Forum
[beginner] Choosing the right tool for a web-based GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[beginner] Choosing the right tool for a web-based GUI
#1
I have to confess that so far I only used python for implementing libraries and tools I can run from the command line.

Now I want to create something where the user interacts with a python process from a web browser. This could work in a similar way to jupyter notebooks.

What would be most important for my purposes are:
  • the ability to easily interact with free text in a way that is similar to editing: the use should be able to mark text, choose actions from a menu for the marked text, the GUI should be able to update when the user clicks on parts of text which are presented in different style or color etc.
  • ideally, the ability to create the layout of the page in a GUI editor, rather than just programmatically
  • actions in the web page as easily programmable in the python backend, rather than doing everything in javascript or similar. I am aware that for the web gui one does need javascript and html and the dom, but ideally, the solution would abstract away from this as much as possible and just allow me to handle gui objects from the python backend
The "rich" text interaction part is really the most important one: I need some way to allow marking, unmarking of text and allowing to perform actions on selected marked portions of text ideally without having to program everything GUI-related for that rich text interaction from scratch.

Does something like that exist? Or does something exist that would make it relatively easy to implement the missing parts?

If not, would it be possible to do this as a native (but portable to Windows, Linux, MacOS) desktop GUI solution, rather than a web GUI?

What are your thoughts about this?
Reply
#2
You could look at Summernote for the text editing.

Perhaps consider a single page web app and JSON-RPC for sending data back and forth between your UI and your Python functions.

If you want a desktop style UI without having to struggle with HTML/CSS you could take a look at SpiderBasic
Reply
#3
Thanks -- the Summernote widget is a good text editing solution, but it I think (maybe I am wrong) it is not easy to adapt it to what I need without massively changing its code since it does not expose an API for how to e.g. adapt a right click menu or change the menu options etc.

The SpiderBasic solution looks like an interesting alternative to implement stuff in a web page, but it does not seem to have a rich text widget so one would have to implement that from scratch (or maybe somebody else already did).

I guess what I need is a rich text widget that has a rich API to allow it to get modified/adapted to how I need it and then use JSON-RPC to send events back to python from there ...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Query on choosing Python 3.8.6 version sureshnagarajan 0 1,789 Feb-16-2021, 05:30 AM
Last Post: sureshnagarajan
  Lost in choosing how to make an graphic interface TheGuyUnknown 3 2,631 Jul-01-2019, 02:08 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020