We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cb9fa7 commit 403e5aaCopy full SHA for 403e5aa
pysenal/io/file.py
@@ -330,10 +330,13 @@ def read(self):
330
self._to_read()
331
return self._file.read()
332
333
- def read_lines(self, skip_empty=False, strip=True):
+ def read_lines(self, keep_end=False, strip=False, skip_empty=False):
334
335
lines = []
336
for line in self._file:
337
+ if not keep_end:
338
+ if line[-1] in _LINE_BREAKS:
339
+ line = line[:-1]
340
if strip:
341
line = line.strip()
342
if skip_empty and not line:
0 commit comments