Run it and collect output.

    Returns:
      1 (true)   If everything went well.
      0 (false)  If there were problems.
171669
def Run(self):
    
    if not self.executable:
      logging.error('Could not locate "%s"' % self.long_name)
      return 0

    finfo = os.stat(self.executable)
    self.date = time.localtime(finfo[stat.ST_MTIME])

    logging.info('Running: %s %s </dev/null 2>&1'
                 % (self.executable, FLAGS.help_flag))
    # --help output is often routed to stderr, so we combine with stdout.
    # Re-direct stdin to /dev/null to encourage programs that
    # don't understand --help to exit.
    (child_stdin, child_stdout_and_stderr) = os.popen4(
      [self.executable, FLAGS.help_flag])
    child_stdin.close()       # '</dev/null'
    self.output = child_stdout_and_stderr.readlines()
    child_stdout_and_stderr.close()
    if len(self.output) < _MIN_VALID_USAGE_MSG:
      logging.error('Error: "%s %s" returned only %d lines: %s'
                    % (self.name, FLAGS.help_flag,
                       len(self.output), self.output))
      return 0
    return 1
421959
def run(self):
        '''
        '''
        if self.verbose:
            pbar = tqdm(total=100)
        while True:
            task_remain = self._task_queue.qsize()
            task_finished = int((float(self.total_task - task_remain) /
                                 float(self.total_task)) * 100)
            if task_finished % 20 == 0 and task_finished != self.current_state:
                self.current_state = task_finished
                logger.info('{0}% done'.format(task_finished))
                if self.verbose and task_finished > 0:
                    pbar.update(20)
            if task_remain == 0:
                break
        logger.debug('All task data cleared')
238928
def run_all
      return pending_result unless test_paths?
      Guard::UI.info("Resetting", reset: true)
      do_run{ @runner.run(@test_paths) }
    end
211063
def run(self, **options):
        
        shutdown_message = options.get('shutdown_message', '')

        self.stdout.write("Performing system checks...\n\n")
        self.check(display_num_errors=True)
        self.check_migrations()
        now = datetime.datetime.now().strftime(r'%B %d, %Y - %X')
        if six.PY2:
            now = now.decode(get_system_encoding())
        self.stdout.write(now)

        addr, port = self.addr, self.port
        addr = '[{}]'.format(addr) if self._raw_ipv6 else addr

        runner = GunicornRunner(addr, port, options)
        try:
            runner.run()
        except KeyboardInterrupt:
            runner.shutdown()
            if shutdown_message:
                self.stdout.write(shutdown_message)
            sys.exit(0)
        except:
            runner.shutdown()
            raise
1315749
def run(self):
        
        read_stdout = partial(self._read_output, stream=self._process.stdout,
                              callback=self._callback_stdout,
                              output_file=self._stdout_file)

        read_stderr = partial(self._read_output, stream=self._process.stderr,
                              callback=self._callback_stderr,
                              output_file=self._stderr_file)

        # capture the process output as long as the process is active
        try:
            while self._process.poll() is None:
                result_stdout = read_stdout()
                result_stderr = read_stderr()

                if not result_stdout and not result_stderr:
                    sleep(self._refresh_time)

            # read remaining lines
            while read_stdout():
                pass

            while read_stderr():
                pass

        except (StopTask, AbortWorkflow) as exc:
            self._exc_obj = exc
416832
def run(self):
        
        while True:  # make sure to run at least once before exiting
            with self._lock:
                self._update(self._data)
            if self._done:
                break
            time.sleep(1)
96363
def run_all
      results = runner.run([options[:spec_dir]])

      self.last_failed_paths = results.keys
      self.last_run_failed   = !results.empty?

      throw :task_has_failed if last_run_failed
    end
87273
def run(self):
        
        failed_result = None
        for rule in self.rules_list:
            for check, deny in rule:
                if not check():
                    failed_result = (False, deny)
                    break
            else:
                return (True, None)
        return failed_result
62434
def run(self):
        
        while True:
            self.update_log_filenames()
            self.open_closed_files()
            anything_published = self.check_log_files_and_publish_updates()
            # If nothing was published, then wait a little bit before checking
            # for logs to avoid using too much CPU.
            if not anything_published:
                time.sleep(0.05)
1165857
def run(self):
        '''
        '''
        while True:
            next_task = self._task_queue.get()
            # If there is any error, only consume data but not run the job
            if self._error_queue.qsize() > 0:
                self._task_queue.task_done()
                continue
            if next_task is None:
                # Poison pill means shutdown
                self._task_queue.task_done()
                break
            try:
                answer = self._func(next_task, **self._args)
                self._task_queue.task_done()
                self._result_queue.put(answer)
            except Exception as e:
                self._task_queue.task_done()
                self._error_queue.put((os.getpid(), e))
                logger.error(e)
                continue
630858
def run(self):
        
        self._initialize()

        self._do_collect()
        while not self._is_finished:
            time.sleep(self._reload_interval)
            self._do_collect()

        self.logger.info("Collector stopped.")
945408
def run(self, data):
        
        result_type = namedtuple('Result', 'code messages')

        if self.passes is True:
            result = result_type(Checker.Code.PASSED, '')
        elif self.passes is False:
            if self.allow_failure:
                result = result_type(Checker.Code.IGNORED, '')
            else:
                result = result_type(Checker.Code.FAILED, '')
        else:
            try:
                result = self.check(data, **self.arguments)
                messages = ''
                if isinstance(result, tuple):
                    result, messages = result

                if result not in Checker.Code:
                    result = Checker.Code.PASSED if bool(result) else Checker.Code.FAILED

                if result == Checker.Code.FAILED and self.allow_failure:
                    result = Checker.Code.IGNORED

                result = result_type(result, messages)
            except NotImplementedError:
                result = result_type(Checker.Code.NOT_IMPLEMENTED, '')
        self.result = result
1217124
def run(self):
        
        luigi.LocalTarget(path=self.fixture).copy(self.output().path)
39584
def run(self):
        

        async def run_command():
            try:
                self.result = self.command(
                    context=self.context,
                    **self.kwargs
                )
            except Exception as error:
                self.exception = error
                print(error)
                import traceback
                traceback.print_exc()
                import sys
                self.context.response.fail(
                    code='COMMAND_EXECUTION_ERROR',
                    message='Failed to execute command due to internal error',
                    error=error
                ).console(
                    whitespace=1
                )

        self._has_started = True
        self._loop = asyncio.new_event_loop()
        self._loop.run_until_complete(run_command())
        self._loop.close()
        self._loop = None
        self.completed_at = datetime.utcnow()
295798
def run(self, directories=None):
        
        if directories is None:
            directories = [os.getcwd()]

        total_successes, total_errors, total_skipped = 0, 0, 0
        for directory in directories:
            successes, errors, skips = self.execute(self.find_specs(directory))
            total_successes += successes
            total_errors += errors
            total_skipped += skips


        self.formatter.finalize()
        return total_successes, total_errors, total_skipped
709611
def _run(self):
        """"""
        try:
            if self.run():
                broadcaster.success(self)
            else:
                broadcaster.failure(self)
        except StandardError:
            import traceback
            traceback.print_exc()
            self._stop()
            raise
        except Exception:
            self._stop()
            raise
        return True
1335607
def run(self):
        
        with self.output().open('w') as output:
            for _ in range(1000):
                output.write('{} {} {}\n'.format(
                    random.randint(0, 999),
                    random.randint(0, 999),
                    random.randint(0, 999)))