title: Break loop by keyboard input in python
body: <p>I have a problem with breaking out of a loop by pressing a key.  </p>
  
  <p>I googled around and found <em>msvcrt module</em> but it did not solve my problem.  </p>
  
  <p>Here is my code.  </p>
  
  <pre><code>while True:
      """some code"""
      if *keyboard_input: space* == True:
          break
  </code></pre>
  
  <p>I know it's a easy question but I just can't find the right module to import.</p>
  
  <p>Thanks!</p>