> Is it possible to print output both in the console and in a file ? class TeeStream: def __init__ (self, *streams): self.streams = streams def write (self, data): for stream in self.streams: stream.write (data) call as stream = TeeStream (sys.stdout, open ('...', 'wt')) Daniel