Source code for openbases.cli.papers.shell

# Copyright (c) 2018, Vanessa Sochat All rights reserved.
# See the LICENSE in the main repository at:
#    https://www.github.com/openbases/openbases-python

import sys

[docs]def main(args, options, parser): lookup = { 'ipython': ipython, 'python': python, 'bpython': bpython } shells = ['ipython', 'python', 'bpython'] for shell in shells: try: return lookup[shell] except ImportError: pass
[docs]def ipython(image): import openbases from IPython import embed embed()
[docs]def bpython(image): import bpython import openbases bpython.embed(locals_={'openbases': openbases})
[docs]def python(image): import code import openbases code.interact(local={"openbases":openbases})