Re: subprocess-how to suppress the stdout

2006-10-26 Thread Fredrik Lundh
alf wrote: >> /dev/null is your friend: >> >> Popen(..., stdout=open("/dev/null", "w"), stderr=subprocess.STDOUT, ...) >> > > I am forced to use win32 :-( plus it needs to be platform independent ... alright, os.devnull is your friend: Popen(..., stdout=open(os.devnull, "w"), stderr=subpr

Re: subprocess-how to suppress the stdout

2006-10-26 Thread alf
Fredrik Lundh wrote: > "alf" <[EMAIL PROTECTED]> wrote: > > >>I can achieve it by using Popen(...,stdout=subprocess.PIPE,...) but >>wonder where the all stdout actually goes. Is it buffered (to eventually >>fill up) > > > it ends up in a pipe buffer, yes. > > >>Or there is a better solution .

Re: subprocess-how to suppress the stdout

2006-10-26 Thread Fredrik Lundh
"alf" <[EMAIL PROTECTED]> wrote: > I can achieve it by using Popen(...,stdout=subprocess.PIPE,...) but > wonder where the all stdout actually goes. Is it buffered (to eventually > fill up) it ends up in a pipe buffer, yes. > Or there is a better solution ... /dev/null is your friend: Popen

subprocess-how to suppress the stdout

2006-10-26 Thread alf
Hi, I use subprocess to execute another program but need to suppress its stdout. I can achieve it by using Popen(...,stdout=subprocess.PIPE,...) but wonder where the all stdout actually goes. Is it buffered (to eventually fill up)or just discarded? Or there is a better solution ... Thx, alf --