[Tutor] Logging stdout and stderr

Alan G alan.gauld at freenet.co.uk
Sat Jun 18 16:18:48 CEST 2005

> I'm trying to log the results of a command that I'm running via the
> module to a file, while at the same time displaying its progress on
> screen.

I think you need popen3...

> figure out a way to simultaneously display it to the screen, kind of
> how unix's "tee" utility works.

Use tee? It's designed for this kind of thing and there
are versions for Windoze too. I personally prefer to leave
this kind of logging as a user option rather than embed
it into my code.

Alan G.

More information about the Tutor mailing list