Package TEES :: Package Utils :: Module Stream :: Class StreamModifier
[hide private]

Class StreamModifier

source code

This class implements a write-method and can therefore replace a stream such as sys.stderr or sys.stdout. The write method first writes the text to a log file, then passes it on to the original stream.

Instance Methods [hide private]
 
__init__(self, stream) source code
 
setLog(self, logfile=None) source code
 
addLog(self, logfile) source code
 
removeLog(self, logfileName, streamName) source code
 
setIndent(self, indent=None) source code
 
setTimeStamp(self, format=None, duplicates=False) source code
 
writeToStream(self, text)
Write directly to the stream without adding to the log file
source code
 
writeToLog(self, text, filename)
Write directly to the log file without sending the input to the stream
source code
 
write(self, text) source code
 
flush(self) source code