def shell():
"""Run a Python shell in the app context."""
try:
import IPython
except ImportError:
IPython = None
if IPython is not None:
IPython.embed(banner1='', user_ns=current_app.make_shell_context())
else:
import code
code.interact(banner='', local=current_app.make_shell_context())
评论列表
文章目录