INNER CODE UNIT · Python

dict_put

aehrc/VariantSpark · cloud/aws-emr/python/vs_emr/cli.py:114

def dict_put(dictionary, pv ):
    path_key, value = pv
    dict_put_path(dictionary, path_key, value)
    return dictionary

def resolve_to_cmd_options(aws_ctx, template_file, user_config):
    
    def to_cmd_option(k,v):
        if "tags" == k:
            return "--%s %s" % (k," ".join("'%s=%s'" % kv for kv in v.items()))            
        elif bool == type(v):
            return ("--%s" if v else "--no-%s") % k
        elif list == type(v) or dict == type(v):
            return "--%s '%s'" % (k,json.dumps(v))
        else:
            return "--%s %s" % (k,json.dumps(v))
        
    with open(template_file, 'r') as template_f:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…