Thanks Tim.
I don’t know about xrc so I’ll take a look at that.
Also, the embedded web server just sounded daunting. Perhaps that’s just the fear of the unknown.
For background, I do a lot of work with embedded processors. I like to use Python and wxPython
to create GUI testing front-ends for myself: A few buttons, some data entry fields, some display
fields. Typically they translate into some form of serial command, or message on a CAN bus, etc.
The allure of html is the ability to quickly reformat my GUI and add/remove pieces either with
an editor or even real-time. Like adding a panel button that is the picture of a toggle switch, when
clicked, changes to a picture of a toggle switch in the other position, etc.
I don’t know what’s best: htmlwindow, webview, or something else. (I’ve no significant experience
with Javascript and html, which hampers my decision too).
I think I’ll Google xrc, and “python embedded web server” and see where I can go from there.
Rufus
-----Original Message-----
From: wxpython-users@googlegroups.com [mailto:wxpython-users@googlegroups.com] On Behalf Of Tim Roberts
Sent: Friday, August 21, 2015 12:44 PM
To: wxpython-users@googlegroups.com
Subject: Re: [wxPython-users] Re: how to get user input from wx.html?
Rufus V. Smith wrote:
I’ve been frustrated in that I’ve not seen throughout the web an
example of processing form data from wx.HtmlWindow.
This thread never got to the final conclusion with a piece of code
that worked.
I want to use HtmlWindow and an html form as my GUI, but not have to
create a local server and use a browser, but to just render an html
page locally in my program and capture the activity/changes/submissions.
So, you’re trying to use HTML as your UI description language, instead of something like xrc, right? I think you’re in for a fair amount of pain. You’re talking about intercepting all of the events that could cause the form to be submitted, and then parsing the tree of controls to extract their contents, making sure that you handle the different field types. In my humble opinion, it would be a lot easier to embed a simple web server in your application to catch the requests and respond. Web servers just aren’t that much work.
The normal thing would be to translate your HTML into normal wx fields and do it native. I do understand the appeal of the HTML approach, however. It very neatly separates presentation from processing.
–
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.