"James" <[EMAIL PROTECTED]> wrote in message > I have a snippet of code in a Python script I'm whipping up that's > causing a not-so-pretty output. Here's the code: > > subprocess.call( "yes '' | make oldconfig" , shell=True ) > ----- > yes: standard output: Broken pipe > yes: write error > ----- > off). However, I'd like to figure out a way to get rid of the error > (or hide it) so that it's not visible to the person running the
Can you capture stdout (actually its probably stderr) and save it to a logfile? Or even just discard it? I know the Popen class can do that but I can't recall if call() has a stdout= option. If not just convert the code to use Popen... HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor