# while loop and break # Here the condition is always true (True), so the loop goes on forever # unless we force the execution out of it using the break statement. # The break statement makes the execution jump out from the loop # instantly when we press cancel when the query dialog appears. import appuifw while True: ret = appuifw.query(u"Continue","query") if not ret: break