[Tutor] Popen problem with a pipe sign "|"
hyou
hyou00 at hotmail.com
Mon Jul 6 16:40:35 CEST 2009
Hi Sander,
My guess is that the two shell options must be treating the command string differently, thus the "|" sign has different functionalities on them.
Thanks!
Shawn
-----Original Message-----
From: Sander Sweers [mailto:sander.sweers at gmail.com]
Sent: Monday, July 06, 2009 10:23 AM
To: hyou
Cc: Python Tutor List
Subject: Re: [Tutor] Popen problem with a pipe sign "|"
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