def next_line(ionex_file):
    """
    next_line
    Function returns the next line in the file
    that is not a blank line, unless the line is
    '', which is a typical EOF marker.
    """

    done   = False
    while not done:
        line = ionex_file.readline()
        if line == '':
            return line
        elif line.strip():
            return line