341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 | |
def readlines(self, cr=1): |
""" 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. """ |
if not cr: |
content = self.read('rU') |
return content.split('\n') |
else: |
-> f = self.open('rU') |
try: |
return f.readlines() |
finally: |
f.close() | |