Start the Qt-runtime and show the window

    Arguments:
        aschild (bool, optional): Run as child of parent process
184509
def main(demo=False, aschild=False, targets=[]):
    

    if aschild:
        print("Starting pyblish-qml")
        compat.main()
        app = Application(APP_PATH, targets)
        app.listen()

        print("Done, don't forget to call `show()`")
        return app.exec_()

    else:
        print("Starting pyblish-qml server..")
        service = ipc.service.MockService() if demo else ipc.service.Service()
        server = ipc.server.Server(service, targets=targets)

        proxy = ipc.server.Proxy(server)
        proxy.show(settings.to_dict())

        server.listen()
        server.wait()
545419
def onStart(self, *args, **kwarg):
        
        with transactUI(self):
            config = self.navbar.getActiveConfig()
            config.resetErrors()
            if config.isValid():
                self.clientRunner.run(self.buildCliString())
                self.showConsole()
            else:
                config.displayErrors()
                self.Layout()
365600
function run(program, options, library) {
    var opts = Assign({}, DEFAULT_OPTIONS, options);
    var argv = opts.argv || [];
    var event = opts.event || null;

    var tokens = RuniqParser.lex(program);
    var ast = RuniqParser.parse(tokens);
    if (!library) library = _createLibrary();
    var interpreter = new RuniqInterpreter(library, opts);

    interpreter.run(ast, argv, event, function(err, result) {
        if (err && opts.error) return opts.error(err);
        if (opts.success) return opts.success(result);
    });
}
572277
def main(self, standalone=False):
        
        window = _Tkinter.Tk()
        sc = _TreeWidget.ScrolledCanvas(window, bg="white",\
                                       highlightthickness=0, takefocus=1)
        sc.frame.pack(expand=1, fill="both")
        item = _ReferrerTreeItem(window, self.get_tree(), self)
        node = _TreeNode(sc.canvas, None, item)
        node.expand()
        if standalone:
            window.mainloop()
1324942
def startLoading(self):
        
        if self._loading:
            return False
        
        tree = self.treeWidget()
        if not tree:
            return
        
        self._loading = True
        self.setText(0, '')
        
        # create the label for this item
        lbl = QtGui.QLabel(self.treeWidget())
        lbl.setMovie(XLoaderWidget.getMovie())
        lbl.setAlignment(QtCore.Qt.AlignCenter)
        tree.setItemWidget(self, 0, lbl)
        
        try:
            tree.loadStarted.emit(self)
        except AttributeError:
            pass
        
        return True
1034124
def _run_atstart():
    ''''''
    global _atstart
    for callback, args, kwargs in _atstart:
        callback(*args, **kwargs)
    del _atstart[:]
210032
def main():
        
        app = QApplication(sys.argv)
        rlbot_icon = QtGui.QIcon(os.path.join(get_rlbot_directory(), 'img', 'rlbot_icon.png'))
        app.setWindowIcon(rlbot_icon)
        window = RLBotQTGui()
        window.show()
        app.exec_()
105448
def run(self, asynchronous=False):
        '''
        
        '''
        log.debug('Process Manager starting!')
        appendproctitle(self.name)

        # make sure to kill the subprocesses if the parent is killed
        if signal.getsignal(signal.SIGTERM) is signal.SIG_DFL:
            # There are no SIGTERM handlers installed, install ours
            signal.signal(signal.SIGTERM, self.kill_children)
        if signal.getsignal(signal.SIGINT) is signal.SIG_DFL:
            # There are no SIGINT handlers installed, install ours
            signal.signal(signal.SIGINT, self.kill_children)

        while True:
            log.trace('Process manager iteration')
            try:
                # in case someone died while we were waiting...
                self.check_children()
                # The event-based subprocesses management code was removed from here
                # because os.wait() conflicts with the subprocesses management logic
                # implemented in `multiprocessing` package. See #35480 for details.
                if asynchronous:
                    yield gen.sleep(10)
                else:
                    time.sleep(10)
                if not self._process_map:
                    break
            # OSError is raised if a signal handler is called (SIGTERM) during os.wait
            except OSError:
                break
            except IOError as exc:
                # IOError with errno of EINTR (4) may be raised
                # when using time.sleep() on Windows.
                if exc.errno != errno.EINTR:
                    raise
                break
128849
function() {
        //var logger = Logger.initialize(mockChildProcessFactory);
        function MockChildProcess() {}
        MockChildProcess.prototype.run = function run (command, args) {
            // logger.debug("CHILD PROCESS MOCK!");
            // logger.debug("command: "+command);
            // logger.debug("args: "+args);
            // logger.debug("env: "+env);
            // logger.debug("code: "+code);
            if ((command === 'ipmitool') && _.contains(args, 'status')) {
                // power status call, return a "success"
                return Promise.resolve({
                    stdout: 'Chassis Power is on'
                });
            }
        };
        return MockChildProcess;
    }
610124
def show_popup(self, *args, **kwargs):
        
        self.mw = JB_MainWindow(parent=self, flags=QtCore.Qt.Dialog)
        self.mw.setWindowTitle(self.popuptitle)
        self.mw.setWindowModality(QtCore.Qt.ApplicationModal)
        w = QtGui.QWidget()
        self.mw.setCentralWidget(w)
        vbox = QtGui.QVBoxLayout(w)
        pte = QtGui.QPlainTextEdit()
        pte.setPlainText(self.get_popup_text())
        vbox.addWidget(pte)
        # move window to cursor position
        d = self.cursor().pos() - self.mw.mapToGlobal(self.mw.pos())
        self.mw.move(d)
        self.mw.show()
768976
def run(cls):
        
        sigint_handler.override()
        # set settings.USE_CACHE before constructing parser, since constructing
        # parser requires loaded assistants
        settings.USE_CACHE = False if '--no-cache' in sys.argv else True
        cls.register_console_logging_handler(logger.logger)
        is_log_file = logger.add_log_file_handler(settings.LOG_FILE)
        if not is_log_file:
            logger.logger.warning("Could not create log file '{0}'.".format(settings.LOG_FILE))
        cls.inform_of_short_bin_name(sys.argv[0])
        top_assistant = bin.TopAssistant()
        tree = top_assistant.get_subassistant_tree()
        argparser = argparse_generator.ArgparseGenerator.\
            generate_argument_parser(tree, actions=actions.actions)
        parsed_args = vars(argparser.parse_args())

        parsed_args_decoded = dict()
        for k, v in parsed_args.items():
            parsed_args_decoded[k] = \
                v.decode(utils.defenc) if not six.PY3 and isinstance(v, str) else v
        parsed_args_decoded['__ui__'] = 'cli'

        if parsed_args.get('da_debug'):
            cls.change_logging_level(logging.DEBUG)

        # Prepare Action/PathRunner
        if actions.is_action_run(**parsed_args_decoded):
            to_run = actions.get_action_to_run(**parsed_args_decoded)(**parsed_args_decoded)
        else:
            parsed_args = cls.transform_executable_assistant_alias(parsed_args_decoded)
            path = top_assistant.get_selected_subassistant_path(**parsed_args_decoded)
            to_run = path_runner.PathRunner(path, parsed_args_decoded)

        try:
            to_run.run()
        except exceptions.ExecutionException:
            # error is already logged, just catch it and silently exit here
            sys.exit(1)
274042
def run(self):
        
        self.call_plugins("on_run")
        if vars(self.arguments).get("version", None):
            self.logger.info("{app_name}: {version}".format(app_name=self.app_name, version=self.version))
        else:
            if self.arguments.command == "main":
                self.main()
            else:
                self.subcommands[self.arguments.command].run()
        self.call_plugins("on_end")
76120
function run(cmd, args, options) {
  if (process.env.SLS_DEBUG) console.log('Running', cmd, args.join(' '));

  const stdio = process.env.SLS_DEBUG && options && options.showOutput
    ? ['pipe', 'inherit', 'pipe'] : 'pipe';
  const ps = child_process.spawnSync(cmd, args, {encoding: 'utf-8', 'stdio': stdio});
  if (ps.error) {
    if (ps.error.code === 'ENOENT') {
      throw new Error(`${cmd} not found! Please install it.`);
    }
    throw new Error(ps.error);
  } else if (ps.status !== 0) {
    throw new Error(ps.stderr);
  }
  return ps;
}
1012957
function run(cmd){

        var proc = require('child_process'),
            done = grunt.task.current.async(); // Tells Grunt that an async task is complete

        proc.exec(cmd,
            function(error, stdout, stderr){
                if(stderr){
                    grunt.log.writeln('ERROR: ' + stderr).error();
                }
                grunt.log.writeln(stdout);
                done(error);
            }
        );
    }
1243910
def start():
    
    os.write(BenchmarkProcess.BACKCHANNEL_OUT, BenchmarkProcess.START)
    response = util.untilConcludes(os.read, BenchmarkProcess.BACKCHANNEL_IN, 1)
    if response != BenchmarkProcess.START:
        raise RuntimeError(
            "Parent process responded with %r instead of START " % (response,))
1261177
def show_and_run(self):
        """"""
        self.display_widget = gtk.Window()
        self.display_widget.add(self.widget)
        self.display_widget.show()
        BaseDelegate.show_and_run(self)
1005493
def run(command, cwd=None, shell=False, raiseOnError=False):
		
		returncode = subprocess.call(command, cwd=cwd, shell=shell)
		if raiseOnError == True and returncode != 0:
			raise Exception('child process ' + str(command) + ' failed with exit code ' + str(returncode))
		return returncode