title: easiest way to pause a command-line python program?
body: <p>Let's say I have a python program that is spitting out lines of text, such as:</p>
  
  <pre><code>while 1:
    print "This is a line"
  </code></pre>
  
  <p>What's the easiest way to allow one to press a key on the keyboard to pause the loop, then to resume if pressed again---but if nothing is pressed it should just continue on automatically?</p>
  
  <p>I'm hoping I don't have to go into something like curses to get this!</p>