'Flush any buffered output.'

def flush(self):

    if self.__buffered_stdout:
        self.write(self.__buffered_stdout, None, logging.info)
        self.__buffered_stdout = []
    if self.__buffered_stderr:
        self.write(self.__buffered_stderr, None, logging.error)
        self.__buffered_stderr = []
