[Tutor] Popen problem with a pipe sign "|"
Sander Sweers
sander.sweers at gmail.com
Fri Jul 3 20:48:14 CEST 2009
2009/7/3 hyou <hyou00 at hotmail.com>:
> Do you know how can I run the command with | sign correctly with popen? Or
> if that’s not possible, can you give me a way to control the output from
> subprocess.call?
subprocess.call does not support this but subprocess.Popen does. See
Doug Hellmann's PMOTW which explains how to witk with stdin and
stdout.
http://blog.doughellmann.com/2007/07/pymotw-subprocess.html
Greets
Sander
More information about the Tutor
mailing list