helpers¶
Functions¶
|
Return the last n lines of a file (supports gzip). |
|
Checks if the search string is found in the first n lines of a file. |
Module Contents¶
- helpers.tail(filename, n)[source]¶
Return the last n lines of a file (supports gzip).
Added in version 0.0.2.
- helpers.head_search(filename: pathlib.Path, sstr: str, n=60)[source]¶
Checks if the search string is found in the first n lines of a file.
Added in version 0.0.2.
- Args:
filename (Path): Path to the file. sstr (str): The search string. n (int, optional): Number of lines to read. Defaults to 60.
- Returns:
bool: True if the search string is found, False otherwise.