Python: Is there a quick way to break out of all functions? Return to main loop?
<p>Quick example:</p>

<pre><code>def func_1():
    func_2()

def func_2():
    func_3()

def func_3():
    #Finds condition to end all calculations and break of out all functions

func_1()
</code></pre>

<p>I have some code with functions running other functions running other functions all together doing a lot of time consuming audio calculations. I have a "stop test" tkinter button that I want to stop all testing with, but for that to happen, all functions has be broken out of. Is there a quick way to do this? To check for a stop condition would require butloads of IF-statements as the stop conditon can be set at any time during the calculation.</p>