def load_ini(filename):
<EOL>path = _find_file(filename)<EOL>pars = {}<EOL>with open(path, '<STR_LIT:r>') as ff:<EOL><INDENT>for lineno, line in enumerate(ff):<EOL><INDENT>if not line: continue<EOL>if '<STR_LIT:#>' in line: line = line[line.index('<STR_LIT:#>')+<NUM_LIT:1>:]<EOL>if "<STR_LIT:=>" not in line: continue<EOL>fields = line.split("<STR_LIT:=>")<EOL>if len(fields) != <NUM_LIT:2>:<EOL><INDENT>import warnings<EOL>warnings.warn("<STR_LIT>" %(lineno,line))<EOL>continue<EOL><DEDENT>pars[fields[<NUM_LIT:0>].strip()] = fields[<NUM_LIT:1>].strip()<EOL><DEDENT><DEDENT>return pars<EOL>
Read a CLASS ``.ini`` file, returning a dictionary of parameters

Parameters
----------
filename : str
    the name of an existing parameter file to load, or one included as
    part of the CLASS source

Returns
-------
dict :
    the input parameters loaded from file