En Fri, 16 Feb 2007 14:04:33 -0300, Bart Ogryczak <[EMAIL PROTECTED]> escribió:
> On Feb 14, 11:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: >> I'm looking for a way to output stdout/stderr (from a subprocess or >> spawn) to screen and to at least two different files. > > I'd derive a class from file, overwrite it's write() method to send a > copy to the log, and then assign sys.stdout = newFile(sys.stdout). > Same for stderr. That's ok inside the same process, but the OP needs to use it "from a subprocess or spawn". You have to use something like tee, working with real file handles. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list