title: How to make os.mkfifo and subprocess.Popen work together?
body: <p>I'm trying to redirect a <strong>patch</strong> command output using a named pipe. I tried like this:</p>
  
  <pre><code>fifo = os.path.join(self.path, 'pipe')
  os.mkfifo(fifo)
  op = os.popen('cat '+ fifo)
  proc = Popen(['patch', current_keyframe, '--input='+fpath, '--output='+fifo], stdin=PIPE, stdout=PIPE)
  os.unlink(fifo)
  print op.read()
  </code></pre>
  
  <p>But my script stops at <em>Popen()</em> call just like <strong>patch</strong> command didn't completed. How I can make it work properly?</p>