Executes the runner based on options
 @runner.execute
 @runner.execute { ... }
439681
def execute(opts={}, &block)
      parse_options
      self.options.merge!(opts)

      @verify_options_hook.call(self.options) if @verify_options_hook

      if options.include?(:kill)
        self.stop
      else # create process
        self.stop if options.include?(:restart)

        # If a username, uid, groupname, or gid is passed,
        # drop privileges accordingly.

        if options[:group]
          gid = options[:group].is_a?(Integer) ? options[:group] : Etc.getgrnam(options[:group]).gid
          Process::GID.change_privilege(gid)
        end

        if options[:user]
          uid = options[:user].is_a?(Integer) ? options[:user] : Etc.getpwnam(options[:user]).uid
          Process::UID.change_privilege(uid)
        end

        @startup_command = block if block_given?
        options[:daemonize] ? daemonize : start
      end
    end
194081
def run(opts, args):
        '''
        '''
        setup_options(opts)

        mode = Modes.ONCE
        if len(args) > 0 and hasattr(Modes, args[0].upper()):
            _mode = args.pop(0).upper()
            mode = getattr(Modes, _mode)

        url = None
        if len(args) > 0:
            # A url was specified
            url = args.pop(0)

        plugin_mgr = PluginManager.load_plugin_from_addonxml(mode, url)
        plugin_mgr.run()
732699
def execute(opts={})
      @result = result_class.new(session.execute(statement, execution_options.merge(opts)), result_opts)
      result.success?
    end
753869
def execute(argv = [], config = {})
      if actions.empty? && !default_command.nil?
        default_command.execute
      else
        actions.each { |a| a.call(argv, config) }
      end
    end
919497
def runner_execute!(host, commands, options = {})
      result = host.execute commands, options
      if result && result[1] == :stdout
        Trooper.logger.info "#{result[2]}\n"
        true
      else 
        false
      end
    end
811453
def execute(self):
        
        #Initialize the option parser
        parser = LaxOptionParser(
            usage="%prog subcommand [options] [args]",
            option_list=BaseCommand.option_list #This will define what is allowed input to the parser (ie --settings=)
        )

        #Parse the options
        options, args = parser.parse_args(self.argv)
        #Handle --settings and --pythonpath properly
        options = handle_default_options(options)

        try:
            #Get the name of the subcommand
            subcommand = self.argv[1]
        except IndexError:
            #If the subcommand name cannot be found, set it to help
            subcommand = 'help'

        #If the subcommand is help, print the usage of the parser, and available command names
        if subcommand == 'help':
            if len(args) <= 2:
                parser.print_help()
                sys.stdout.write(self.help_text + '\n')
        else:
            #Otherwise, run the given command
            self.fetch_command(subcommand).run_from_argv(self.argv)
241664
public void execute(final String[] args) {
        try {
            Options options = createOptions();
            if (collectOptions(options, args)) {
                setDefaults();
                generate();
            }
        } catch (Exception e) {
            log.error("COBOL to Avro translation failure", e);
            throw new RuntimeException(e);
        }
    }
744749
public void run(String[] args) {
        String context = args.length > 0 ? args[0] : "";
        String action = args.length > 1 ? args[1] : "";
        String option = args.length > 2 ? args[2] : "";

        switch (context) {
            case "server":
                server(action, option);
                break;
            case "version":
                version();
                break;
            default:
                help();
        }
    }
183034
def runner(Options, buffering=True):
    
    def run(argv=None):
        if not buffering:
            sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
            sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)

        if argv is None:
            argv = sys.argv
        o = Options()
        try:
            o.parseOptions(argv[1:])
        except usage.UsageError, e:
            if hasattr(o, 'subOptions'):
                print str(o.subOptions)
            else:
                print str(o)
            print str(e)
            return 1

        return 0

    return run
911656
def execute(options = {})
      input_files = get_input_files(options)
      # we want to avoid printing the binary file
      input_files.delete_if do |file|
        File.binary?(file.gsub(/^\./, options[:base_dir]))
      end

      if input_files.empty?
        puts "No file found for your option: #{options}"
        return
      end

      to_htmls(input_files, options)
      generated_files = input_files.map { |f| "#{f}.xhtml" }
      index_file = "./index.html"
      IndexHtml.htmlify generated_files, base_dir: options[:base_dir],
                                         output:   index_file,
                                         drop_ext: true
      generated_files << index_file if options[:index]
      output_file = "vim_printer_#{File.basename(File.expand_path(options[:base_dir]))}.tar.gz"
      AgileUtils::FileUtil.tar_gzip_files(generated_files, output_file)
      AgileUtils::FileUtil.delete(generated_files)
      FileUtils.rm_rf(index_file) if options[:index]
      puts "Your output file is '#{File.absolute_path(output_file)}'"
    end
985499
def execute(args=nil)
      args ||= EMPTY_TASK_ARGS
      if application.options.dryrun then
        Rake::Application.mesg "** Execute (dry run) #{name}"
        return
      end
      if application.options.trace then
        Rake::Application.mesg "** Execute #{name}"
      end
      application.enhance_with_matching_rule(name) if @actions.empty?
      @actions.each do |act|
        case act.arity
        when 1
          act.call(self)
        else
          act.call(self, args)
        end
      end
    end
273142
def runner(opts, utils=None, context=None, whitelist=None):
    '''
    
    '''
    if utils is None:
        utils = {}
    if context is None:
        context = {}
    ret = LazyLoader(
        _module_dirs(opts, 'runners', 'runner', ext_type_dirs='runner_dirs'),
        opts,
        tag='runners',
        pack={'__utils__': utils, '__context__': context},
        whitelist=whitelist,
    )
    # TODO: change from __salt__ to something else, we overload __salt__ too much
    ret.pack['__salt__'] = ret
    return ret
335774
def exec(method, options = {}, &code)
    Manager.connection.exec(method, options, &code)
  end
782824
def run(self, conn, tmp, module_name, module_args, inject):
        '''  '''

        # shell and command module are the same
        if module_name == 'shell':
            module_name = 'command'
            module_args += " #USE_SHELL"

        (module_path, is_new_style, shebang) = self.runner._copy_module(conn, tmp, module_name, module_args, inject)
        self.runner._low_level_exec_command(conn, "chmod a+rx %s" % module_path, tmp)

        return self.runner._execute_module(conn, tmp, 'async_wrapper', module_args,
           async_module=module_path,
           async_jid=self.runner.generated_jid,
           async_limit=self.runner.background,
           inject=inject
        )
63271
public void setRunner(Class<? extends OperaRunner> runner) {
    options.get(RUNNER).setValue(runner.getName());
  }
436821
public void execute()
    {
        for ( Resource resource : resources )
        {
            // Check for relative paths in the resource configuration.
            // http://maven.apache.org/plugin-developers/common-bugs.html#Resolving_Relative_Paths
            File resourceDir = new File( resource.getDirectory() );
            if ( !resourceDir.isAbsolute() )
            {
                resourceDir = new File( project.getBasedir(), resource.getDirectory() );
                resource.setDirectory( resourceDir.getAbsolutePath() );
            }

            addResource( resource );
        }
    }
1106132
public final void execute() {
        try {
            Matcher<R> matcher = createMatcher();
            R result;
            if (input == null && timeout == null) {
                result = getExpect().expect(matcher);
            } else if (timeout == null) {
                result = getExpect().expectIn(input, matcher);
            } else if (input == null) {
                result = getExpect().expect(timeout, matcher);
            } else {
                result = getExpect().expectIn(input, timeout, matcher);
            }
            exportSuccessfulResult(resultPrefix, result);
        } catch (IOException e) {
            throw new BuildException(e);
        }
    }