我的flask 启动脚本run.py如下
import os
from test import app
print "test"
if __name__ == "__main__":
app.run()
python run.py执行后
发现输出两次test
如下:
test
* Running on xxxxxx
test
但是app.debug关闭之后,只输出一次,即
test
* Running on xxxxx
这是什么原理呢?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证0级讲师