output to console and to multiple files

nathan.shair at gmail.com nathan.shair at gmail.com
Thu Feb 15 10:57:39 EST 2007


On Feb 14, 6:52 pm, "Gabriel Genellina" <gagsl... at yahoo.com.ar> wrote:
> En Wed, 14 Feb 2007 19:28:34 -0300, nathan.sh... at gmail.com
> <nathan.sh... at gmail.com> escribió:
>
> > I'm looking for a way to output stdout/stderr (from a subprocess or
> > spawn) to screen and to at least two different files.
>
> Look at the tee command. If you control the subprocess, and it's written
> in Python, using the Python recipes would be easier and perhaps you have
> more control.
> But if you can't modify the subprocess, you'll have to use tee.
>
> --
> Gabriel Genellina

Tee, the unix function? Or is there a tee that is python?




More information about the Python-list mailing list