title: msvcrt getch pauses script, has to continue
body: <h3><em><strong>PYTHON 3.3, msvcrt</em></strong></h3>
  
  <pre><code>import sys, msvcrt
  print("Please press a key to see its value")
  while 1:
      key = msvcrt.getch()
      print("the key is")
      print(key)
      if ord(key) == 27: # key nr 27 is escape
          sys.exit()
  </code></pre>
  
  <p>this is my code, just as an example.
  the code pauses when it gets to the <code>key = msvcrt.getch()*, or *key = ord(getch())</code> for that matter, right here i used the first one.
  I'd like to have this code constantly print <em>the key is</em>
  instead of just printing <em>the key is</em> when i give a new input (when i press a key).</p>
  
  <p>so the printed output would look something like this:</p>
  
  <pre><code>the key is
  the key is
  the key is
  the key is
  the key is
  the key is
  77
  the key is
  the key is
  the key is
  </code></pre>
  
  <p>which is needed if you want to make something like <em>snake</em>, where you don't want your game to be paused everytime you want to <em>getch</em>, you don't want it to pause, waiting for an input.</p>