The function calls _run_path for given set of paths
167181
def _run_process(self, start_path, stop_path, process_num=0):
        
        # pre processing
        self.producer.initialize_worker(process_num)
        self.consumer.initialize_worker(process_num)

        # processing
        for path in range(start_path, stop_path):
            self._run_path(path)

        # post processing
        self.consumer.finalize_worker(process_num)
528604
def run(file_path,include_dirs=[],dlems=False,nogui=False):
    
    import argparse
    args = argparse.Namespace()
    args.lems_file = file_path
    args.I = include_dirs
    args.dlems = dlems
    args.nogui = nogui
    main(args=args)
722323
function(paths, callback, results, cached) {
        results = results || [];

        if(!paths.length) {
            callback.apply(null, results);
            return results;
        }

        var path = paths.shift();

        //what do we do if it's not a string ?
        if(typeof path !== 'string') {
            results.push(null);
            //um skip it?
            loadArray(paths, callback, results, cached);
            return;
        }

        acquire.loadPath(path, function(result) {
            results.push(result);
            loadArray(paths, callback, results, cached);
        }, cached);
    }
671348
def run(self):
        
        error = None
        # run 'pre_run', 'logging', 'dependencies' and 'run'
        try:  # serve as a central place for error logging
            self._logging(self.parsed_args)
            if 'deps_only' not in self.parsed_args:
                self._run_path_run('pre', self.parsed_args)
            self._run_path_dependencies(self.parsed_args)
            if 'deps_only' not in self.parsed_args:
                self._run_path_run('', self.parsed_args)
        except exceptions.ExecutionException as e:
            error = self._log_if_not_logged(e)
            if isinstance(e, exceptions.YamlError):  # if there's a yaml error, just shut down
                raise e

        # in any case, run post_run
        try:  # serve as a central place for error logging
            self._run_path_run('post', self.parsed_args)
        except exceptions.ExecutionException as e:
            error = self._log_if_not_logged(e)

        # exitfuncs are run all regardless of exceptions; if there is an exception in one
        #  of them, this function will raise it at the end
        try:
            utils.run_exitfuncs()
        except exceptions.ExecutionException as e:
            error = self._log_if_not_logged(e)

        if error:
            raise error
258547
private void runPreStep(String folderPath) {
        Cli cli = new Cli();
        boolean success = false;
        List<String> compileOutput = cli.runCmd(folderPath, cli.getCommandParams(SBT, COMPILE));
        if (!compileOutput.isEmpty()) {
            if (compileOutput.get(compileOutput.size() - 1).contains(SUCCESS)) {
                success = true;
            }
        }
        if (!success) {
            logger.warn("Can't run '{} {}'", SBT, COMPILE);
        }
    }
1373186
def run(self):
        
        while True:
            path, params = self.path_queue.get()
            errors = run(path, **params)
            self.result_queue.put(errors)
            self.path_queue.task_done()
28136
def _run_apps(self, paths):
        

        for path in paths:
            common.shell_process(path, background=True)
            time.sleep(0.2)
622
def runGlob(self, path, **kwargs):
        
        def commandComplete(cmd):
            return cmd.updates['files'][-1]

        return self.runRemoteCommand('glob', {'path': path,
                                              'logEnviron': self.logEnviron, },
                                     evaluateCommand=commandComplete, **kwargs)
589687
def _handle_runs(self, relpath, params):
    """"""
    runs_by_day = self._partition_runs_by_day()
    args = self._default_template_args('run_list.html')
    args['runs_by_day'] = runs_by_day
    content = self._renderer.render_name('base.html', args).encode("utf-8")
    self._send_content(content, 'text/html')
1293487
def runAllInDir(dir_path, exclude=[], add_args=(), ignoreErrors=True):
    
    print('testing all modules of %s' % dir_path)

    if type(add_args) in (tuple, list):
        sys.argv.extend(add_args)
    else:
        sys.argv.append(add_args)
    t = 0
    failed = []
    for _, modname, ispkg in pkgutil.walk_packages(
            [dir_path],
            #onerror=lambda x: None
    ):
        if not ispkg and modname != thismodname and modname not in exclude:  # don't test this module
            print('... %s' % modname)
            t0 = time()
            try:
                runpy.run_module(
                    modname,
                    init_globals=None,
                    run_name='__main__',
                    alter_sys=False)
            except Exception as err:
                if ignoreErrors:
                    print("FAILED: %s" % err)
                else:
                    raise err
                failed.append((modname, err))
            dt = time() - t0
            t += dt
            print('execution time=%s' % dt)
    print('----------------')
    print('time needed=%s' % t)
    if failed:
        print('=======================')
        print('failed for %s modules' % len(failed))
        print('-----------------------')
        for mod, err in failed:
            print(mod, err)
1256244
def runfile(fd, argv, fd_name='<unknown>', compile_flags=0, dont_inherit=1,
        filename=None, threads=True, verbose=False):
    
    _run(threads, verbose, 'runfile', filename, fd, argv, fd_name,
        compile_flags, dont_inherit)
910802
def run(self, tool, args, new_import_path=''):
        
        if new_import_path != '':
            #print('APPENDING PATH = ', new_import_path)
            sys.path.append(new_import_path)
        
        #if silent == 'N':
        print('main called ' + tool['file'] + '->' + tool['function'] + ' with ', args, ' = ', tool['return'])
        mod = __import__( os.path.basename(tool['file']).split('.')[0]) # for absolute folder names
        # mod = __import__( tool['file'][:-2]) # for aikif folders (doesnt work)
        func = getattr(mod, tool['function'])
        tool['return'] = func(args)
        return tool['return']
948269
def run_on_removals(paths)
      return unless options[:delete]
      validate_at_least_one_target('delete')
      with_all_target_paths(paths) do |_, to_path|
        validate_to_file(to_path)
        UI.info("deleting #{to_path}") if options[:verbose]
        FileUtils.rm(to_path)
      end
    end
1192839
function traverse (root, dirs, collect, next) {
  const rootPath = path.join (root, ...dirs);
  fs.lstat (rootPath, (err0) => {
    if (err0) {
      next (err0);
    } else {
      fs.readdir (rootPath, (_, files) => {
        let pending = files.length;
        for (let file of files) {
          const filePath = path.join (root, ...dirs, file);
          fs.lstat (filePath, (err1, stats) => {
            if (err1) {
              next (err1);
            } else {
              if (stats.isDirectory ()) {
                traverse (root, [...dirs, file], collect, err2 => {
                  if (err2) {
                    next (err2);
                  } else {
                    if (--pending === 0) {
                      next ();
                    }
                  }
                });
              } else {
                if (stats.isFile ()) {
                  collect (dirs, file, files);
                  if (--pending === 0) {
                    next ();
                  }
                }
              }
            }
          });
        }
      });
    }
  });
}
161651
def run_file(path):
    """"""
    if PY26:
        dirpath, name, _ = splitname(path)
        found = imp.find_module(name, [dirpath])
        module = imp.load_module("__main__", *found)
        return vars(module)
    else:
        return runpy.run_path(path, run_name="__main__")
1030530
def join_paths(path1: Optional[str], path2: Optional[str]) -> Optional[str]:
    
    if path1 is not None and path2 is not None:
        return os.path.join(path1, path2)
891207
def filter_req_paths(paths, func):
    """"""
    if not isinstance(paths, list):
        raise ValueError("Paths must be a list of paths.")

    libs = set()
    junk = set(['\n'])
    for p in paths:
        with p.open(mode='r') as reqs:
            lines = set([line for line in reqs if func(line)])
            libs.update(lines)

    return list(libs - junk)