Python version of unix tee

Rolf Sander

Download Python code pyteetime-1.0.zip

Motivation

The unix command tee [1] splits the output of a program so that it can be both displayed and saved in a file. Unfortunately, Python does not provide something like this. The program pyteetime is based on the original code from Akkana Peck [2], with a few classmethods added.

Usage

Simply type “python tee-test.py” to see how it works.

Licence

The code is available under the GPL.

References

[1]   Wikipedia. tee (command). https://en.wikipedia.org/wiki/Tee_(command).

[2]   A. Peck. Tee in python (shallow thoughts). http://shallowsky.com/blog/programming/python-tee.html.

This document was last changed: 2019-05-26