txt¶
Classes
- class TxtReader[source]¶
Bases:
object
Safe text file reader.
- static check(path)[source]¶
Checks that a file has the correct extension and exists.
- Parameters:
path (
Union
[str
,Path
]) – Path to the file.- Returns:
- static read(path, verbose=True)[source]¶
Reads and parses a text file. :type path:
Union
[str
,Path
] :param path: Path to the file. :type verbose:Union
[bool
,int
] :param verbose: Verbosity of the method. :rtype:str
:return: Text content.- Parameters:
path (str | Path)
verbose (bool | int)
- Return type:
str