flask reloader只要有文件修改就会自动重启
from flask import Flask app = Flask(__name__) def index(): return __name__ + '<h1>hello world1</h>' app.add_url_rule('/', 'index2', index) @app.route('/user/<int:name>') def test(name): return '<h1>hello, {}</h1>'.format(name) if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=False, use_reloader=True)