|
|
@ -410,7 +410,18 @@ def shell_command(): |
|
|
|
app.debug and ' [debug]' or '', |
|
|
|
app.debug and ' [debug]' or '', |
|
|
|
app.instance_path, |
|
|
|
app.instance_path, |
|
|
|
) |
|
|
|
) |
|
|
|
code.interact(banner=banner, local=app.make_shell_context()) |
|
|
|
ctx = {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Support the regular Python interpreter startup script if someone |
|
|
|
|
|
|
|
# is using it. |
|
|
|
|
|
|
|
startup = os.environ.get('PYTHONSTARTUP') |
|
|
|
|
|
|
|
if startup and os.path.isfile(startup): |
|
|
|
|
|
|
|
with open(startup, 'r') as f: |
|
|
|
|
|
|
|
eval(compile(f.read(), startup, 'exec'), ctx) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ctx.update(app.make_shell_context()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
code.interact(banner=banner, local=ctx) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cli = FlaskGroup(help="""\ |
|
|
|
cli = FlaskGroup(help="""\ |
|
|
|