Performing code depending on input without pressing 'Enter'
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3523174/raw-input-in-python-without-pressing-enter">raw_input in python without pressing enter</a>  </p>
</blockquote>



<p>Some of the code:</p>

<pre><code>print "Do you want to (e)ncode?"
option = raw_input("&gt; ")
if option == "e":
    print "Encoding..." # and some other code, which isn't important here
else:
    pass
</code></pre>

<p>What I want to do is that if you enter "e", it immediately performs the code in the block, without pressing 'Enter'.</p>

<p>Is this possible? If yes, how?</p>
