So The title pretty much explains my question. What is the difference between stdout=subprocess.PIPE and stdout=PIPE? Both come from the subprocess module, but why would you use one over the other? How do you use stdout=PIPE? I.e. capture the output? Or print it to the screen? I only know how to redirect it with subprocess.PIPE.
e.g.
import subprocess
from subprocess import PIPE
p = subprocess.Popen(['samtools', 'view', 'bamfile.bam'], stdout=PIPE)
makes
subprocess.PIPEavailable under the alternative namePIPE; it is equivalent to:Therefore, it does not matter which version you choose.
subprocess.PIPEmakes it clear where the variable is coming from, but is slightly longer.