def process(self, args=argv, input_file=stdin, output_file=stdout):
        """ Processes search results as specified by command arguments.

        :param args: Sequence of command arguments
        :param input_file: Pipeline input file
        :param output_file: Pipeline output file

        """
        self.logger.debug('%s arguments: %s' % (type(self).__name__, args))
        self._configuration = None

        if len(args) >= 2 and args[1] == '__GETINFO__':

            ConfigurationSettings, operation, args, reader = self._prepare(
                args, input_file=None)
            try:
                self.parser.parse(args, self)
            except (SyntaxError, ValueError) as e:
                writer = csv.DictWriter(output_file, self, fieldnames=['ERROR'])
                writer.writerow({'ERROR': e})
                self.logger.error(e)
                return

            self._configuration = ConfigurationSettings(self)

            writer = csv.DictWriter(
                output_file, self, self.configuration.keys(), mv_delimiter=',')
            writer.writerow(self.configuration.items())

        elif len(args) >= 2 and args[1] == '__EXECUTE__':

            self.input_header.read(input_file)
            ConfigurationSettings, operation, args, reader = self._prepare(
                args, input_file)

            try:
                self.parser.parse(args, self)
            except (SyntaxError, __HOLE__) as e:
                from sys import exit
                self.messages.append("error_message", e)
                self.messages.write(output_file)
                self.logger.error(e)
                exit(1)

            self._configuration = ConfigurationSettings(self)

            if self.show_configuration:
                self.messages.append(
                    'info_message', '%s command configuration settings: %s'
                    % (self.name, self._configuration))

            writer = csv.DictWriter(output_file, self)
            self._execute(operation, reader, writer)

        else:

            file_name = path.basename(args[0])
            message = (
                'Command {0} appears to be statically configured and static '
                'configuration is unsupported by splunklib.searchcommands. '
                'Please ensure that default/commands.conf contains this '
                'stanza: '
                '[{0}] | '
                'filename = {1} | '
                'supports_getinfo = true | '
                'supports_rawargs = true | '
                'outputheader = true'.format(type(self).name, file_name))
            self.messages.append('error_message', message)
            self.messages.write(output_file)
            self.logger.error(message)
dataset/ETHPy150Open splunk/splunk-ref-pas-code/spikes/googledrive_addon/bin/splunklib/searchcommands/search_command.py/SearchCommand.process