def close(self):
        """The close method restores stdout and stderr to normal."""
        self.logfile.close()
        sys.stderr = sys.__stderr__
        sys.stdout = sys.__stdout__
The close method restores stdout and stderr to normal.
recipes/Python/440498_Win32com__Batch_repathing_Autocad/recipe-440498.py