title: Using curses, how do I update the screen or wait for a key?
body: <p>How do I update the screen or wait for a key at the same time? I'm using unicurses on Python but I think I would have the same problem in C.
  Here's what I want to do in pseudo code:</p>
  
  <pre><code>function startScreen(){
     stdscr = initscr()
     while True{
        - Update screen using a variable that is constantly changing (probably by a thread, right?)
        - Get a key with getch() - to close or interact with the screen
     }
  }
  </code></pre>
  
  <p>My problem is that the screen doesn't update unless something happens, like resizing the screen or pressing a key. I was thinking about using the while loop (and a time.sleep(1)?) to update the screen and a thread to wait for keys. Is that possible? I don't know much about threads, that's why I'm asking. Is there a simpler way?</p>
  
  <p>Thank you.</p>