1

I have a simple python flask project in which I need to have a user confirmation before any action can take place.

...
#need to confirm from the user before the action takes place. If it is yes, continue with action(), else skip action
#I need to keep monitoring the confirm_var here
action()
...

After getting confirmation from the user, I am calling this confirmation() function to set the confirm_var using AJAX call.

def confirmation()
    #set confirm_var to yes/no depending on user input.

So, my question is how to keep monitoring the confirm_var.

phanny
  • 577
  • 1
  • 6
  • 27

1 Answers1

0

You could use write your own event with a wait function. Wait is more CPU hungry but it is more responsive. See here for example. But it depends on your python version.

M Dennis
  • 177
  • 7