是否可以使用类似于python的flask shell来运行python文件?如同:
flask shell myfile.py
flask shell -f myfile.py
这就是我使用时得到的全部$ flask shell --help
:
Usage: flask shell [OPTIONS]
Runs an interactive Python shell in the context of a given Flask
application. The application will populate the default namespace of this
shell according to it's configuration.
This is useful for executing small snippets of management code without
having to manually configure the application.
Options:
--help Show this message and exit.
我指定了以下变量:
export FLASK_APP=run.py
export FLASK_ENV=development
工具版本信息: - Linux 3.10 - Python 3.7.1 - Flask 1.0.2