def merge_conf(to_hash, other_hash, path=[]):
    "merges other_hash into to_hash"
    for key in other_hash:
        if (key in to_hash and isinstance(to_hash[key], dict)
                and isinstance(other_hash[key], dict)):
            merge_conf(to_hash[key], other_hash[key], path + [str(key)])
        else:
            to_hash[key] = other_hash[key]
    return to_hash
merges other_hash into to_hash