Starts a new magic IPython shell.
189666
def start_ipython_player(commands, speed=1):
    """"""
    PlayerTerminalIPythonApp.commands = commands
    PlayerTerminalIPythonApp.speed = speed
    PlayerTerminalIPythonApp.launch_instance()
1214282
def launch_shell():
    '''  '''
    parser = argparse.ArgumentParser(
        description='Launch the psiTurk interactive shell.'
    )

    # Optional flags
    parser.add_argument(
        '-v', '--version', help='Print version number.', action="store_true"
    )
    parser.add_argument(
        '-c', '--cabinmode', help='Launch psiturk in cabin (offline) mode',
        action="store_true"
    )
    script_group = parser.add_mutually_exclusive_group()
    script_group.add_argument(
        '-s', '--script', help='Run commands from a script file'
    )
    script_group.add_argument(
        '-e', '--execute', help='Execute one command specified on the command line'
    )
    args, unknownargs = parser.parse_known_args()
    # If requested version just print and quit
    if args.version:
        print version_number
    else:
        import psiturk.psiturk_shell as ps
        if args.script:
            ps.run(cabinmode=args.cabinmode, script=args.script, quiet=True)
        elif args.execute or unknownargs:
            if unknownargs:
                execute= ' '.join(unknownargs)
            else:
                execute = args.execute
            ps.run(cabinmode=args.cabinmode, execute=execute, quiet=True)
        else:
            ps.run(cabinmode=args.cabinmode)
253887
def start(self, plugins):
        """"""
        self.nvim.run_loop(self._on_request,
                           self._on_notification,
                           lambda: self._load(plugins),
                           err_cb=self._on_async_err)
361645
def restart(self, *args, **kw):
        """"""
        self.stop()
        self.start(*args, **kw)
213176
def start(self):
        '''
        
        '''
        super(Minion, self).start()
        while True:
            try:
                self._real_start()
            except SaltClientError as exc:
                # Restart for multi_master failover when daemonized
                if self.options.daemon:
                    continue
            break
814453
def _run_ipmitool(cmd):
        

        log().debug('Running ipmitool "%s"', cmd)

        child = Popen(cmd, shell=True, stdout=PIPE)
        output = child.communicate()[0]

        log().debug('return with rc=%d, output was:\n%s',
                    child.returncode,
                    output)

        return output, child.returncode
117082
def _start_machine(machine, session):
    '''
    
    '''
    try:
        return machine.launchVMProcess(session, '', '')
    except Exception as e:
        log.debug(e.message, exc_info=True)
        return None
602753
def start_console(local_vars={}):
    ''''''
    transforms.CONSOLE_ACTIVE = True
    transforms.remove_not_allowed_in_console()
    sys.ps1 = prompt
    console = ExperimentalInteractiveConsole(locals=local_vars)
    console.interact(banner=banner)
1119941
def start_new_kernel(startup_timeout=60, kernel_name='python', **kwargs):
    """"""
    logger.debug('Starting new kernel: "%s"' % kernel_name)
    km = KernelManager(kernel_name=kernel_name,
                       kernel_spec_manager=NbvalKernelspecManager())
    km.start_kernel(**kwargs)
    kc = km.client()
    kc.start_channels()
    try:
        kc.wait_for_ready(timeout=startup_timeout)
    except RuntimeError:
        logger.exception('Failure starting kernel "%s"', kernel_name)
        kc.stop_channels()
        km.shutdown_kernel()
        raise

    return km, kc
772990
def start_container(self, cls, **kwargs):
        """"""
        # Convert stylename strings to actual style elements.
        kwargs = self._replace_stylename(kwargs)
        # Create the container.
        container = cls(**kwargs)
        self._containers.append(container)
261030
def start(context, mip_config, email, priority, dryrun, command, start_with, family):
    """"""
    mip_cli = MipCli(context.obj['script'])
    mip_config = mip_config or context.obj['mip_config']
    email = email or environ_email()
    kwargs = dict(config=mip_config, family=family, priority=priority, email=email, dryrun=dryrun, start_with=start_with)
    if command:
        mip_command = mip_cli.build_command(**kwargs)
        click.echo(' '.join(mip_command))
    else:
        try:
            mip_cli(**kwargs)
            if not dryrun:
                context.obj['store'].add_pending(family, email=email)
        except MipStartError as error:
            click.echo(click.style(error.message, fg='red'))
492815
def start(name, config_file=None):
    '''
    
    '''
    if not exists(name):
        raise ContainerNotExists("The container (%s) does not exist!" % name)
    if name in running():
        raise ContainerAlreadyRunning('The container %s is already started!' % name)
    cmd = ['lxc-start', '-n', name, '-d']
    if config_file:
        cmd += ['-f', config_file]
    subprocess.check_call(cmd)
1260043
def shell():
    
    ctx = _get_shell_ctx()
    try:
        import IPython
        IPython.embed(header=_get_shell_banner(), user_ns=ctx)
    except ImportError:
        import code
        code.interact(banner=_get_shell_banner(verbose=True), local=ctx)
1261911
def startLoop():
    
    def _ipython_loop_asyncio(kernel):
        '''
        Use asyncio event loop for the given IPython kernel.
        '''
        loop = asyncio.get_event_loop()

        def kernel_handler():
            kernel.do_one_iteration()
            loop.call_later(kernel._poll_interval, kernel_handler)

        loop.call_soon(kernel_handler)
        try:
            if not loop.is_running():
                loop.run_forever()
        finally:
            if not loop.is_running():
                loop.run_until_complete(loop.shutdown_asyncgens())
                loop.close()

    patchAsyncio()
    loop = asyncio.get_event_loop()
    if not loop.is_running():
        from ipykernel.eventloops import register_integration, enable_gui
        register_integration('asyncio')(_ipython_loop_asyncio)
        enable_gui('asyncio')
60330
def _run_cmd(cmd, ctx, glob, loc):  # pragma: no cover
    """"""
    if PDB:
        _enable_pdb()
    if IPYTHON:
        from IPython import start_ipython
        args_ipy = ['-i', '--gui=qt']
        ns = glob.copy()
        ns.update(loc)
        return start_ipython(args_ipy, user_ns=ns)
    # Profiling. The builtin `profile` is added in __init__.
    prof = __builtins__.get('profile', None)
    if prof:
        prof = __builtins__['profile']
        return _profile(prof, cmd, glob, loc)
    return exec_(cmd, glob, loc)
793293
def start(self):
        
        self.window = _curses.initscr()
        _curses.savetty()
        _curses.start_color()
        _curses.use_default_colors()
        self.window.leaveok(1)
        _curses.raw()
        self.window.keypad(1)
        _curses.noecho()
        _curses.cbreak()
        _curses.nonl()
        _curses.curs_set(0)
        if self.blocking:
            self.window.nodelay(0)
        else:
            self.window.nodelay(1)
        self.running = True
        while self.running:
            self.cycle()
            if self.friendly and not self.blocking:
                time.sleep(self.delay)
        self.stop()
810484
def start(self):
        
        rs = self.connection.start_instances([self.id])
        if len(rs) > 0:
            self._update(rs[0])