code: def cmdline(self, **kwargs):
          
  
          args = [self.executable]
          indexed_args = []
  
          for key, value in kwargs.iteritems():
              parameter = self[key]
              if value != parameter.default:
                  no_value = parameter.type == 'boolean'
  
                  if parameter.longflag:  # use longflag where possible
                      args.append("--%s" % parameter.longflag)
                      if no_value:
                          args.append(str(value))
                  elif parameter.flag:
                      args.append("-%s" % parameter.flag)
                      if no_value:
                          args.append(str(value))
                  elif parameter.index:
                      indexed_args.insert(int(parameter.index), str(value))
  
          return args + indexed_args
docs: Generates a valid command line call for the executable given by call arguments in `kwargs`
          :param kwargs: values to call the executable
          :return: the command line
          :rtype: list