@core_cmd.command()
@click.option('--ipython/--no-ipython', default=True)
def shell(ipython):
    """Runs a Python shell with Quokka context"""
    import code
    import readline
    import rlcompleter
    _vars = globals()
    _vars.update(locals())
    _vars.update(dict(app=app, db=db))
    readline.set_completer(rlcompleter.Completer(_vars).complete)
    readline.parse_and_bind("tab: complete")
    try:
        if ipython is True:
            from IPython import start_ipython
            start_ipython(argv=[], user_ns=_vars)
        else:
            raise ImportError
    except __HOLE__:
        shell = code.InteractiveConsole(_vars)
        shell.interact()
dataset/ETHPy150Open rochacbruno/quokka/manage.py/shell