Returns all lines from the file in a list.
(self)
| 179 | return self._prepare_value(self._read_buf.ReadLineAsString()) |
| 180 | |
| 181 | def readlines(self): |
| 182 | """Returns all lines from the file in a list.""" |
| 183 | self._preread_check() |
| 184 | lines = [] |
| 185 | while True: |
| 186 | s = self.readline() |
| 187 | if not s: |
| 188 | break |
| 189 | lines.append(s) |
| 190 | return lines |
| 191 | |
| 192 | def tell(self): |
| 193 | """Returns the current position in the file.""" |