Why is this necessary, rather than just using subprocess.PIPE?