mutapath.MutaPath.lines¶
-
MutaPath.
lines
(encoding=None, errors='strict', retain=True)[source]¶ Open this file, read all lines, return them in a list.
- Optional arguments:
- encoding - The Unicode encoding (or character set) of
- the file. The default is
None
, meaning the content of the file is read as 8-bit characters and returned as a list of (non-Unicode) str objects. - errors - How to handle Unicode errors; see help(str.decode)
- for the options. Default is
'strict'
. - retain - If
True
, retain newline characters; but all newline - character combinations (
'\r'
,'\n'
,'\r\n'
) are translated to'\n'
. IfFalse
, newline characters are stripped off. Default isTrue
.
See also