def end_of_file(ascii_file):
    """Returns True if the end of the file has been reached."""
    file_pos = ascii_file.tell()
    line = ascii_file.readline()
    if len(line) == 0:
        return True  # end of file
    ascii_file.seek(file_pos)
    return False