def addParametersToD(paramL, paramD):
    """Given a list of lines (e.g. from a parameters file) add parameters
to paramD. Each line is a string. Some will be comments or blank
lines, and others will be python assignment statements. We use the
assignment statements to create entries in paramD.
    """
    for s in paramL:
        if s == '' or s.lstrip() == '' or s.lstrip()[0] == '#':
            continue
        key, value = s.rstrip().split('=')
        key = key.strip()
        value = value.strip()
        paramD[key] = eval(value)
    return paramD
