PyWebIO
PyWebIO copied to clipboard
how to restart the pywebio script with a Button?
Hi Wang, Thank you for creating such an awesome project!
I'd like to add a button at the end of the pywebio script, then the user can click the button and restart the app. I had searched the doc but found nothing about this feature. could you give me a hint? thanks again.
Just wrap your script code with a function, and use the following code to start your script:
while True:
app()
act = actions(buttons=["Restar", "Exit"])
if act=="Exit":
break
thanks! will have a try.