Re: subprocess.Popen and replacing the shell pipe line

2005-09-23 Thread [EMAIL PROTECTED]
by the way, you're re-inventing the wheel somewhat, check out the stdlib pipes module (http://docs.python.org/lib/module-pipes.html) -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen and replacing the shell pipe line

2005-09-22 Thread jepler
Probably the quoting of the argument to grep. try this instead: > p1 = Popen(['grep', 'Sep 22', '/var/log/auth.log'], stdout=PIPE) etc Jeff -- http://mail.python.org/mailman/listinfo/python-list

subprocess.Popen and replacing the shell pipe line

2005-09-22 Thread Tom Brown
I need to chain together three linux commands and get the final output. I read the documentation for Popen in the subprocess module for replacing the shell pipe line. I followed the example and keep getting a 0 where I should be getting a 1. I am trying to do this: grep "Sep 22" /var/log/auth.