def read_list(path):
    """
    Reads a list containing one file per line.
    Returns an index of line number - line content
    """

    with open(path, 'r') as fhandle:
        fdata = {}
        for nline, line in enumerate(fhandle):
            if not line.strip():
                continue
            # Remove extension
            fdata[nline+1] = '.'.join(line.strip().split('.')[:-1])

    return fdata