helpers

Functions

tail(filename, n)

Return the last n lines of a file (supports gzip).

head_search(filename, sstr[, n])

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.

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.