def _execute(self, outfile,
                 verbosity=None, always=False, continue_=False,
                 reporter='console', num_process=0, par_type='process',
                 single=False, auto_delayed_regex=False):
        # get tasks to be executed
        # self.control is saved on instance to be used by 'auto' command
        self.control = TaskControl(self.task_list,
                                   auto_delayed_regex=auto_delayed_regex)
        self.control.process(self.sel_tasks)

        if single:
            for task_name in self.sel_tasks:
                task = self.control.tasks[task_name]
                if task.has_subtask:
                    for task_name in task.task_dep:
                        sub_task = self.control.tasks[task_name]
                        sub_task.task_dep = []
                else:
                    task.task_dep = []

        # reporter
        if isinstance(reporter, str):
            reporter_cls = self.reporters[reporter]
        else:
            # user defined class
            reporter_cls = reporter

        # verbosity
        if verbosity is None:
            use_verbosity = Task.DEFAULT_VERBOSITY
        else:
            use_verbosity = verbosity
        show_out = use_verbosity < 2  # show on error report

        # outstream
        if isinstance(outfile, str):
            outstream = codecs.open(outfile, 'w', encoding='utf-8')
        else:  # outfile is a file-like object (like StringIO or sys.stdout)
            outstream = outfile
        self.outstream = outstream

        # run
        try:
            # FIXME stderr will be shown twice in case of task error/failure
            if isinstance(reporter_cls, type):
                reporter_obj = reporter_cls(outstream, {'show_out': show_out,
                                                        'show_err': True})
            else:  # also accepts reporter instances
                reporter_obj = reporter_cls

            run_args = [self.dep_manager, reporter_obj,
                        continue_, always, verbosity]

            if num_process == 0:
                RunnerClass = Runner
            else:
                if par_type == 'process':
                    RunnerClass = MRunner
                    if not MRunner.available():
                        RunnerClass = MThreadRunner
                        sys.stderr.write(
                            "WARNING: multiprocessing module not available, " +
                            "running in parallel using threads.")
                elif par_type == 'thread':
                    RunnerClass = MThreadRunner
                else:
                    msg = "Invalid parallel type %s"
                    raise InvalidCommand(msg % par_type)
                run_args.append(num_process)

            runner = RunnerClass(*run_args)
            return runner.run_all(self.control.task_dispatcher())
        finally:
            if isinstance(outfile, str):
                outstream.close()
This method returns an instance of W_StructType only.
dataset/ETHPy150Open pydoit/doit/doit/cmd_run.py/Run._execute--crossover with--dataset/ETHPy150Open samth/pycket/pycket/values_struct.py/W_StructType.make_simple