【发布时间】:2020-04-20 13:52:47
【问题描述】:
我在我的应用程序末尾添加了以下代码行:
if __name__ == "__main__":
app.run(ssl_context="adhoc")
但是我在 PyCharm 中运行项目时得到的输出是
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
但是,当我使用命令 python app.py 从终端 (Alt+F12) 运行应用程序时 我得到了输出
* Running on https://127.0.0.1:5000/ (Press CTRL+C to quit)
这背后的原因是什么?有没有办法使用 PyCharm 运行它?每次都输入命令相当繁琐。
【问题讨论】: