def read_file(filename, delimiter=None, startline=0):
    """General function to read text file into a 2D list."""

    data_list = []
    ifile = open(filename,'rU')

    for line in ifile:

        if delimiter:
            data = line.split(delimiter)
        else:
            data = line.split()
        data_list.append(data)

    ifile.close()
    return data_list[startline:]