title: Pause function execution while awaiting input in entry (tkinter)
body: <p>Let's say I've got a function that requests input. How can I pause the function that calls this function while I am waiting for user input in an entry widget. I tried it with a while loop and time.sleep(sec). Furthermore I executed the function within another thread (so the main thread should not be interrupted), but the problem that always occurs is that the whole program freezes (typing in entry impossible)!</p>
  
  <p>Because I do not have that much experience with Python I am truly stuck.</p>
  
  <p>PS: I am coding on a mac.</p>
  
  <p>The code I used:</p>
  
  <pre><code>    import time
      _input = []
  
      def get_input()
        try:
          return _input[0]
        except IndexError:
          return None
  
      def req():
        while get_input() == None:
          time.sleep(1)
        return get_input()
  </code></pre>
  
  <p>The function req() is always called within a function which is called via 'getattr()' in a function which parses the input in the entry widget. The variable '_input' automatically gets the user input from the entry. The input I then successfully got from the '_input' variable is then discarded.</p>
  
  <p>Maybe the problem is that the function is running and that is why another function cannot be executed... but shouldn't that be irrelevant if I was using a distinct thread? Why didn't that work...?</p>