On Thursday, 21 January 2021 12:52:44 GMT Hamish McIntyre-Bhatty wrote:
> I haven't looked at Flask in detail, but one way to do it would be to
> use a GET or POST value when the button is submitted in the form, so it
> eg redirects to /control.html?action=play.

Thanks Hamish.  I did wonder if that might be the only way, but it seemed a 
bit clunky and felt that there ought to be something more sophisticated that 
I've missed.

One trouble that I've found with Flask is that on its own its fairly 
straightforward, but much of what is done is done my the loading of flask 
modules and other helper libraries.  It isn't always obvious which of those 
module or libraries to study to find what I need.

That's why I've been trying to find an example from someone who has done 
something similar.  I've found a number of examples using javascript (I even 
used one myself for the original WMT Webserver), but they all simply redirect 
to another page.  I need to execute a line of Python.

-- 



                Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-02-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to