On Wed, Jun 9, 2010 at 9:15 PM, Chris Seberino <cseber...@gmail.com> wrote:
> How do subprocess.Popen("ls | grep foo", shell=True) with shell=False?

I would think:

from subprocess import Popen, PIPE
ls = Popen("ls", stdout=PIPE)
grep = Popen(["grep", "foo"], stdin=ls.stdout)

Cheers,
Chris
--
http://blog.rebertia.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to