Download Python code pyteetime-1.0.zip
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.
Simply type “python tee-test.py” to see how it works.
The code is available under the GPL.
[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