code: def unredirect_stdout(self):
          
          if hasattr(self, 'hijacked_stdout') and hasattr(self, 'hijacked_stderr'):
              sys.stdout = self.hijacked_stdout
              sys.stderr = self.hijacked_stderr
docs: Redirect stdout and stderr back to screen.