def readlines(self, clear=False):
        """Return all complete lines from the pipe as a list of strings.

        If `clear` is `True`, clear the accumulated data, but leave any
        incomplete line
        """
        datastr = self.fetch_data(clear)
        lines = datastr.splitlines(True)
        if lines[-1][-1] != '\n':
            if clear:
                self.__data[:] = [ lines[-1] ]
            return lines[0:-1]
        return lines
Return all complete lines from the pipe as a list of strings.

        If `clear` is `True`, clear the accumulated data, but leave any
        incomplete line
        
recipes/Python/576967_Asynchronous_pipe_communicatiusing/recipe-576967.py