title: Subprocess module Python
body: <p>We have an issue using the subprocess library in Python. We tried to pass 2 message with the function communicate. The first one work correctly, but the second one generates a IOError
  error. I think that we probably use incorrectly the function of the subprocess library, but we are not able to fix it.
  Can anyone help us?
  Here is the code:</p>
  
  <pre><code>from subprocess import *
  
  video=Popen("omxplayer myvideo.mp4",shell=True,stdout=PIPE,stdin=PIPE)
  
  video.stdin.write('+')
  video.stdin.flush()
  result=video.stdout.read()
  print "Vol +: "+result
  video.communicate('p')
  print "Pause"
  </code></pre>
  
  <p>And the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "youtube.py", line 55, in &lt;module&gt;
      proc.stdin.write('+')
  IOError: [Errno 32] Broken pipe
  </code></pre>
  
  <p>Thank you</p>