I'm trying to redirect a patch command output using a named pipe. I tried like this:
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()
But my script stops at Popen() call just like patch command didn't completed. How I can make it work properly?