6 progress_file = os.fdopen(os.dup(1), "w", 0)
12 self.progress_file = progress_file
16 self.log_file = open(name, "w")
17 os.dup2(self.log_file.fileno(), 1)
18 os.dup2(self.log_file.fileno(), 2)
22 self.log_file.write(msg)
24 def verbose(self, msg):
25 if self.verbosity and self.log_file:
26 self.log_file.write(msg)
28 def progress(self, msg):
29 if self.progress_file:
30 self.progress_file.write(msg)