[Tutor] Popen problem with a pipe sign "|"

Sander Sweers sander.sweers at gmail.com
Mon Jul 6 16:22:46 CEST 2009


2009/7/6 hyou <hyou00 at hotmail.com>:
> Do I post to the list by also replying to Python Tutor List?

Yes, thanks.

> Thanks for the answer! I found the problem was because I put the 2nd
> argument to Popen with Shell = true. Though I'm not sure why it doesn't work
> with Shell = true while the same setting works for other commands.

You can read up on subprocess on [1]. I do not understand why this
does not work with shell=True. My best guess is that it gets
interpreted as a pipe.

Greets
Sander

[1] http://docs.python.org/library/subprocess.html


More information about the Tutor mailing list