Send keyboard event using subprocess
<p>I have two python scripts. First one is just script waiting for user keyboard input. When user presses a key it print a pressed key value.</p>

<p>Second script calls first one through subprocess using Popen like this</p>

<pre><code>p = Popen('python first_script.py', shell=True, universal_newlines=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT)
print p.communicate(input="some value paased through")[0]
</code></pre>

<p>I got it working when I send through string values. But I don't know how to send keyboard event and how to read it properly.</p>

<p>I know it is kind of a strange logic behind this. But i need this to work :P</p>
