original_docstring: Translate keyword arguments (JSON) into an argument list for an external process.
  
      CALLBACK-type args can do arbitrary things to the process being started (set env vars, change
      the process name, etc.).
  
      
docstring: Translate keyword arguments (JSON) into an argument list for an external process.
  CALLBACK-type args can do arbitrary things to the process being started (set env vars, change
  the process name, etc.).
docstring_tokens: Translate keyword arguments ( JSON ) into an argument list for an external process . CALLBACK - type args can do arbitrary things to the process being started ( set env vars change the process name etc . ) .
code: def apply_json_args(process, json_doc, custom_kwargs={}):
      """Translate keyword arguments (JSON) into an argument list for an external process.
  
      CALLBACK-type args can do arbitrary things to the process being started (set env vars, change
      the process name, etc.).
  
      """
  
      for field in json_doc:
  
          kwarg, kwarg_type = ("--" + field, KWARG_TYPE_NORMAL) if field not in custom_kwargs \
              else custom_kwargs[field][0:2]
          value = json_doc[field]
  
          if kwarg_type == KWARG_TYPE_NORMAL:
  
              if value is not None:
                  process.arguments.append(kwarg)
                  if str(value):
                      process.arguments.append(str(value))
  
          elif kwarg_type == KWARG_TYPE_EQUAL:
  
              process.arguments.append(kwarg + "=" + str(value))
  
          elif kwarg_type == KWARG_TYPE_MULTIPLE:
  
              for ind_value in value:
                  process.arguments.append(kwarg)
                  process.arguments.append(str(ind_value))
  
          elif kwarg_type == KWARG_TYPE_CALLBACK:
  
              cl_arg_callback = custom_kwargs[field][2]
              cl_arg_callback(process, field, value)
code_tokens: def apply_json_args ( process , json_doc , custom_kwargs = { } ) : for field in json_doc : kwarg , kwarg_type = ( "--" + field , KWARG_TYPE_NORMAL ) if field not in custom_kwargs else custom_kwargs [ field ] [ 0 : 2 ] value = json_doc [ field ] if kwarg_type == KWARG_TYPE_NORMAL : if value is not None : process . arguments . append ( kwarg ) if str ( value ) : process . arguments . append ( str ( value ) ) elif kwarg_type == KWARG_TYPE_EQUAL : process . arguments . append ( kwarg + "=" + str ( value ) ) elif kwarg_type == KWARG_TYPE_MULTIPLE : for ind_value in value : process . arguments . append ( kwarg ) process . arguments . append ( str ( ind_value ) ) elif kwarg_type == KWARG_TYPE_CALLBACK : cl_arg_callback = custom_kwargs [ field ] [ 2 ] cl_arg_callback ( process , field , value )
short_docstring: Translate keyword arguments (JSON) into an argument list for an external process.
short_docstring_tokens: Translate keyword arguments ( JSON ) into an argument list for an external process .
comment: """Translate keyword arguments (JSON) into an argument list for an external process.
  
      CALLBACK-type args can do arbitrary things to the process being started (set env vars, change
      the process name, etc.).
  
      """