(file_path)
https://stackoverflow.com/a/18603065/632517
https://stackoverflow.com/a/18603065/632517
https : // stackoverflow . com / a / 18603065 / 632517
def _get_last_line(file_path):
    """
    https://stackoverflow.com/a/18603065/632517
    """
    with open(file_path, "rb") as f:
        f.seek(-2, os.SEEK_END)  # Jump to the second last byte.
        while f.read(1) != b"\n":  # Until EOL is found...
            f.seek(-2, os.SEEK_CUR)  # ...jump back the read byte plus one more.
        return f.readline()
def _get_last_line ( file_path ) : with open ( file_path , "rb" ) as f : f . seek ( - 2 , os . SEEK_END ) # Jump to the second last byte. while f . read ( 1 ) != b"\n" : # Until EOL is found... f . seek ( - 2 , os . SEEK_CUR ) # ...jump back the read byte plus one more. return f . readline ( )