title: How to move the stdout pointer in python to a previous line?
body: <p>I'm trying to print a counter while waiting for user input. So I spawn the counter in its own thread and have it run something like:</p>
  
  <pre><code>while waiting:
    print('Elapsed time:', time, end='\r')
  </code></pre>
  
  <p>The end argument is used to set the pointer to the beginning of the current line thus updating the displayed time instead of flooding the screen every update. </p>
  
  <p>That works ok however I'd like to display something underneath this similar to commands displayed in many console based text editors and I cannot find a way to do so. I guess my question is is there a way to set where the pointer is that print will write to?</p>
  
  <p>I first though sys.stdout, but when I try to do sys.stdout.seek(anoffset) (or many of the other sys.stdout calls) I get an error stating it's not seekable. Read calls say it's not readable, etc. I'm not sure what to do. If I could seek other than iterating through the whole file is there an easy way to seek to the previous line? </p>