def myreadlines(self):
    """Read and return the list of all logical lines using readline."""
    lines = []
    while True:
        line = self.readline()
        if not line:
            return lines
        else:
            lines.append(line)