Read and return a list of lines from the path. if cr is False, the newline will be removed from the end of each line.
(self, cr=1)
| 375 | return f.read() |
| 376 | |
| 377 | def readlines(self, cr=1): |
| 378 | class="st">"""Read and return a list of lines from the path. if cr is False, the |
| 379 | newline will be removed from the end of each line.class="st">""" |
| 380 | mode = class="st">"r" |
| 381 | |
| 382 | if not cr: |
| 383 | content = self.read(mode) |
| 384 | return content.split(class="st">"\n") |
| 385 | else: |
| 386 | f = self.open(mode) |
| 387 | try: |
| 388 | return f.readlines() |
| 389 | finally: |
| 390 | f.close() |
| 391 | |
| 392 | def load(self): |
| 393 | class="st">""class="st">"(deprecated) return object unpickled from self.read()"class="st">"" |