title: Move cursor up using Colorama has problems at bottom of screen
body: <p>I'm using Colorama in Python (32-bit 2.7.2) on Windows 7 (64-bit) and it works great for colouring text in the console, but I'm having problems when getting it to move the cursor.</p>
  
  <p>Specifically, if I use the ANSI code to go up a line, it works when the cursor is far from the bottom of the screen, but when the cursor is near the bottom the cursor doesn't move up correctly and then text starts to be printed further down the page causing it to scroll.</p>
  
  <p>The code I use to move up a line is:</p>
  
  <pre><code>sys.stdout.write('\x1b[4A')
  </code></pre>
  
  <p>where 4 is moving it four lines up (and something like '\x1b[8A' would move it eight lines up)</p>
  
  <p>I'm not sure if this is a lack of understanding on my part regarding how ANSI codes work or whether it is an issue with Colorama.</p>
  
  <p>To recreate it, run something like this in either the normal Windows Command Prompt (cmd.exe) or in Console2 (it seems to make no difference)</p>
  
  <pre><code>from __future__ import print_function
  import colorama
  from colorama import Fore, Back, Style
  import sys
  
  def main():
  
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      print('Blah')
      sys.stdout.write('\x1b[6A')
      sys.stdout.write('some text')
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>If you run the code above near the top of the screen, it'll end up with "<strong>some text</strong>" written part way through the "<strong>Blah</strong>" output, but if you start it when already near the bottom of the screen the "<strong>some text</strong>" will be at the end, with the cursor seemingly not having scrolled back at all.</p>
  
  <p>I specifically need to move the cursor up, so it's placed on a relative basis to other output, rather than give it an absolute screen position (ie move it to position x,y)</p>
  
  <p>Any suggestions on where to start?</p>