Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-22 Thread Terry Coles
On Friday, 22 January 2021 13:36:39 GMT Keith Edmunds wrote: > Install the Kindle Optimizer Pro Chrome extension. Works very well. "Adds > Google Search, Translate, Copy, Text to Speech, and Alarm functionality to > the Kindle Cloud Reader." Keith, That extension seems to have been discontinued.

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-22 Thread Keith Edmunds
On Fri, 22 Jan 2021 13:06:23 +, d-...@hadrian-way.co.uk said: > One annoying thing when it comes to textbooks is that you cannot copy > the text in any Kindle type, so you have to type the code by hand. Install the Kindle Optimizer Pro Chrome extension. Works very well. "Adds Google Search,

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-22 Thread Terry Coles
On Friday, 22 January 2021 12:55:31 GMT Hamish McIntyre-Bhatty wrote: > I'm glad you found a solution. Is it on gitlab? Might be useful for me > to see it as well, seeing as I'll be using Flask soon for the visitor GUI. It's not finished yet. I have to fully integrate the sockets code and

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-22 Thread Hamish McIntyre-Bhatty
On 22/01/2021 12:51, Terry Coles wrote: > On Thursday, 21 January 2021 14:28:42 GMT Ralph Corderoy wrote: >> https://stackoverflow.com/questions/19794695/flask-python-buttons/27952991#2 >> 7952991 is the same approach as the book. You may find the book better >> written than trying to piece it

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-22 Thread Terry Coles
On Thursday, 21 January 2021 14:28:42 GMT Ralph Corderoy wrote: > https://stackoverflow.com/questions/19794695/flask-python-buttons/27952991#2 > 7952991 is the same approach as the book. You may find the book better > written than trying to piece it together from SO answers. :-) Ralph, You are

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 14:40:35 GMT Stephen Wolff wrote: > My google search was for ‘Flask button names’ btw - as I knew that > was a way to detect which button had being clicked for a form to be > submitted. So Google got it right - the SO post explains the task you > were trying to

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Stephen Wolff
On 21 Jan 2021, at 14:37, Terry Coles wrote: On Thursday, 21 January 2021 14:28:42 GMT Ralph Corderoy wrote: https://stackoverflow.com/questions/19794695/flask-python-buttons/27952991#2 7952991 is the same approach as the book. You may find the book better written than trying to piece it

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 14:28:42 GMT Ralph Corderoy wrote: > https://stackoverflow.com/questions/19794695/flask-python-buttons/27952991#2 > 7952991 is the same approach as the book. You may find the book better > written than trying to piece it together from SO answers. :-) Well I

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Ralph Corderoy
Hi Terry, > Anyway, I'm going to try the method(s) at stack overflow first. https://stackoverflow.com/questions/19794695/flask-python-buttons/27952991#27952991 is the same approach as the book. You may find the book better written than trying to piece it together from SO answers. :-) --

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 14:08:44 GMT Ralph Corderoy wrote: > You want a form. > https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iii-web-fo > rms from that book seems to do exactly what you want. Just think of your > needs as a form with just a submit button, so no fields

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Ralph Corderoy
Hi Terry, Keith wrote: > > I don't know how well you know Flask, Terry, but this is an > > excellent intro. It's not going to be the immediate answer to your > > question, though. > > > > http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world > > the book majors on the

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread PeterMerchant
On 21/01/2021 13:54, Terry Coles wrote: On Thursday, 21 January 2021 13:52:27 GMT PeterMerchant wrote: Sending you separately an article form LXformat that shows how to do this. I did this for my remote control car, with the R-Pi configured as an access point and Flask Web server, and the HTML

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 13:55:09 GMT PeterMerchant wrote: > Go-car.sh used to start programs when I am testing. These lines go into > rc.local for running at startup That seems to be the way that Hamish proposed it. -- Terry Coles -- Next meeting: Online, Jitsi,

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread PeterMerchant
On 21/01/2021 12:39, Terry Coles wrote: Hi, I'm building a Web page to allow users to monitor key status information on one of the Pis at WMT. I also want to create a page where users can press a button to carry out certain tasks, such as Start or Stop some music playing or select a new

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 13:52:27 GMT PeterMerchant wrote: > Sending you separately an article form LXformat that shows how to do this. > I did this for my remote control car, with the R-Pi configured as an access > point and Flask Web server, and the HTML Calling Python to set GPIO pins to >

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread PeterMerchant
On 21/01/2021 12:39, Terry Coles wrote: Hi, I'm building a Web page to allow users to monitor key status information on one of the Pis at WMT. I also want to create a page where users can press a button to carry out certain tasks, such as Start or Stop some music playing or select a new

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 13:27:01 GMT Stephen Wolff wrote: > This does something like your pseudo code: > > - https://stackoverflow.com/questions/19794695/flask-python-buttons It does doesn't it. :-) Now I have a new starting point. Thanks for that. You guys obviously have a better

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 13:10:56 GMT Keith Edmunds wrote: > I don't know how well you know Flask, Terry, but this is an excellent > intro. It's not going to be the immediate answer to your question, though. > > http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-wor > ld

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Stephen Wolff
I've been using subprocess.open in the Player programs, but I don't believ the I need it for this. The Flask App is written in Python, so I should be able to use the sockets code that we already have (written by Hamish for the River System) to pass messages between the two running programs, eg

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 13:08:32 GMT Stephen Wolff wrote: > You might need the subprocess.open method or .run I've been using subprocess.open in the Player programs, but I don't believ the I need it for this. The Flask App is written in Python, so I should be able to use the sockets code

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Stephen Wolff
On 21 Jan 2021, at 13:11, Terry Coles wrote: On Thursday, 21 January 2021 13:02:13 GMT Ralph Corderoy wrote: How do they not meet your requirements? That might give us a better idea of what to suggest. Well they don't do anything like the psuedo code that I mentioned. :-) This does

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
On Thursday, 21 January 2021 13:02:13 GMT Ralph Corderoy wrote: > How do they not meet your requirements? > That might give us a better idea of what to suggest. Well they don't do anything like the psuedo code that I mentioned. :-) Seriously, everything I've found so far has been oriented

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Keith Edmunds
I don't know how well you know Flask, Terry, but this is an excellent intro. It's not going to be the immediate answer to your question, though. http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world -- Linux Tips: https://www.tiger-computing.co.uk/category/techtips/

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Hamish McIntyre-Bhatty
On 21/01/2021 13:03, Terry Coles wrote: > 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

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Stephen Wolff
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

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
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

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Ralph Corderoy
Hi Terry, > I've found quite a lot of tutorials and text book examples that use > forms and a 'Submit' button, but so far nothing quite like what > I want. How do they not meet your requirements? That might give us a better idea of what to suggest. -- Cheers, Ralph. -- Next meeting:

Re: [Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Hamish McIntyre-Bhatty
On 21/01/2021 12:39, Terry Coles wrote: > Hi, > > I'm building a Web page to allow users to monitor key status information on > one of the Pis at WMT. I also want to create a page where users can press a > button to carry out certain tasks, such as Start or Stop some music playing > or >

[Dorset] Using Flask to render a set of Buttons.

2021-01-21 Thread Terry Coles
Hi, I'm building a Web page to allow users to monitor key status information on one of the Pis at WMT. I also want to create a page where users can press a button to carry out certain tasks, such as Start or Stop some music playing or select a new Playlist. The Player is written in Python.