How to break a while loop in Kivy?
<p>Here I have a function runStuff that I would like to keep running the function saySomething() repeatedly but will exit upon the pressing of the exit button.</p>

<p>It is currently running the while loop without allowing the input of the exit button.</p>

<pre><code>def saySomething():
    ttsSpeak('Say this phrase')

def runStuff(self):
    while True:
        if App.get_running_app().stop() != True:
            saySomething()
            time.sleep(2)
        else: break

def exit(self):
    App.get_running_app().stop()

class AudibleCoachApp(App):
    def build(self):
        layout = BoxLayout(padding=7, spacing=3, orientation='vertical') # set layout of the screen
        btn1 = Button(text='Start it', size_hint=(1, .66)) # create a button instance
        btn1.bind(on_press=runStuff) # binding the button with the function below
        btn3 = Button(text='Exit', size_hint=(1, .17)) # create a button instance
        btn3.bind(on_press=exit) # binding the button with the function below
        layout.add_widget(btn1) # physically add the button onto the layout
        layout.add_widget(btn2) # physically add the button onto the layout
        layout.add_widget(btn3) # physically add the button onto the layout 

        return layout

if __name__ == '__main__':
    AudibleCoachApp().run()
</code></pre>