title: Kivy: Label text does not update during for-loop
body: <p>I have an issue when I try to update a label text during a for-loop.  There are similar entries (e.g.: <a href="https://stackoverflow.com/questions/27213545/update-properties-of-a-kivy-widget-while-running-code">Update properties of a kivy widget while running code</a>) but they do not seem to fit my issue exactly (or I missed the point…).
  I run following code:</p>
  
  <p>*.py:</p>
  
  <pre><code>from kivy.app import App
  from kivy.uix.boxlayout import BoxLayout
  from kivy.properties import StringProperty
  #from time import sleep
  
  class MyBox(BoxLayout):
      tobeupd = StringProperty()
  
      def __init__(self,*args,**kwargs):
          super(MyBox,self).__init__(*args,**kwargs)
          self.tobeupd = '#'
  
      def upd_ltxt(self):
          for i in range(1,10):
              self.tobeupd = str(i)
              print(self.tobeupd)
              input('Write something: ')  # new line, see edit below
              #sleep(0.5) 
  
  class updApp(App):
      def build(self):
          return MyBox()
  
  if __name__ == '__main__':
      updApp().run() 
  </code></pre>
  
  <p>*.kv</p>
  
  <pre><code>&lt;MyBox&gt;:
      orientation: 'horizontal'
      cols: 2
      Label:
          text: root.tobeupd
      Button:
          text: 'Start Update'
          on_release: root.upd_ltxt()
  </code></pre>
  
  <p>Whereas the ‘print’ statement updates the shell regularly, the label text updates at the end of the for-loop only.
  Can anyone explain to me why Kivy works this way and how I can overcome this problem? </p>
  
  <p>EDIT: According to PM2Ring and Gugas, I changed the code in order to avoid the sleep-function. The problem remains if I ask the user to enter something before the loop can be continued. The values are updated in the shell but not on the label.</p>