Skip to content Skip to sidebar Skip to footer

Twisted Pipe Two Processes With Spawnprocess

I'm trying to use Twisted with Python2.7 for piping two processes. What I'd like to do is: myImagesPipesGenerator | ffmpeg -i - myImagesPipesGenerator is outputing on stdout an i

Solution 1:

Create the pipe yourself:

read, write = os.pipe()

And then pass the file descriptors where you want the children to use them. Something like:

generatorTransport = reactor.spawnProcess(..., childFDs={1: write})
ffmpegTransport = reactor.spawnProcess(..., childFDs={0: read})

Post a Comment for "Twisted Pipe Two Processes With Spawnprocess"