I am trying to run paste <(zcat f1.gz) <(zcat f2.gz)
using subprocess.
Here's what I have done so far:
ps1 = subprocess.Popen(('zcat', 'f1.gz'), stdout=subprocess.PIPE)
ps2 = subprocess.Popen(('zcat', 'f2.gz'), stdout=subprocess.PIPE)
ps3 = subprocess.Popen('paste', stdout=subprocess.PIPE, stdin=subprocess.PIPE)
But I am not sure how to provide ps3 with both ps1.stdout and ps2.stdout as inputs. I would appreciate it if you guys can help me with this and let me know if I am on the right track.