title: APT command line interface-like yes/no input?
body: <p>Is there any short way to achieve what the APT (<em>Advanced Package Tool</em>) command line interface does in Python?</p>
  
  <p>I mean, when the package manager prompts a yes/no question followed by <code>[Yes/no]</code>, the script accepts <code>YES/Y/yes/y</code> or <kbd>Enter</kbd> (defaults to <code>Yes</code> as hinted by the capital letter).</p>
  
  <p>The only thing I find in the official docs is <code>input</code> and <code>raw_input</code>...</p>
  
  <p>I know it's not that hard to emulate, but it's annoying to rewrite :|</p>