1
我有一個簡單的python燒瓶項目,我需要在發生任何操作之前有一個用戶確認。如何監控python中的變量?
...
#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()
...
從用戶獲得確認後,我打電話這種confirmation()
功能設置使用AJAX調用confirm_var。
def confirmation()
#set confirm_var to yes/no depending on user input.
所以,我的問題是如何繼續監測confirm_var
。