def readline(self, size=-1):
        """Read one entire line from the file."""
        if "U" in self.mode:
            ends = ("\n", "\r", "\r\n")
        else:
            ends = ("\n", )
        buff = ""
        while True:
            d = self.read(1)
            buff += d
            if any([e in buff for e in ends]):
                return buff
            if (size <= len(buff)) or (not d):
                return buff
Read one entire line from the file.
lib/stashutils/fsi/DropBox.py