def read_template(template):
    """ Reads an OXDNA template into a dictionary

    args:
        template -- str: path of the template

    returns:
        dict<arg, val>
    """
    content = {}
    with open(template) as f:
        for l in f:
            line = l.strip() #.replace("$rpoly", script_path)
            if line.startswith("#") or len(line) < 1:
                continue
            p, k = line.split("=")
            content[p.strip()] = k.strip()
    return content