Measuring time between keystrokes in python
<p>Using the following code: </p>

<pre><code>   &gt;&gt;&gt; import time
   &gt;&gt;&gt; start = time.time()
   &gt;&gt;&gt; end = time.time()
   &gt;&gt;&gt; end - start
</code></pre>

<p>one can measure time between "start" and "end". What about measuring the time between specific keystrokes? Specifically, if a module was run and the user started typing something, how can python measure the time between the <strong>first</strong> keystroke and the <strong>enter key</strong>. Say I ran this script and it said: "Please enter your name, then press enter: ". I write Nico, and then press enter. How can I measure time between "N" and the enter key. This should be in seconds, and after pressing enter, the script should end. </p>
