$ ./python3-flask-hellowrold.py * Serving Flask app "python3-flask-hellowrold" (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Serving Flask app "python3-flask-hellowrold" (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: on * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) * Restarting with stat * Debugger is active! * Debugger PIN: 259-438-846
開啟 Debug mode 的話,程式碼有更動的話 server 會自動 reload,另外有任何錯誤的話都能在瀏覽器上看到錯誤的訊息以及 Traceback 等等的資訊。
if __name__ == '__main__': HOST, PORT = "0.0.0.0", 7000
# Create the server, binding to localhost on port 7000 socketserver.TCPServer.allow_reuse_address = True server = socketserver.TCPServer((HOST, PORT), MyTCPHandler)
常用參數說明如下, R: Recurse directories for files (目錄下遞迴建立索引) b: Build the cross-reference only q: Build an inverted index for quick symbol searching (建立 cscope.in.out 和 cscope.po.out,以便增快搜尋速度) k: Kernel Mode - don’t use /usr/include for #include files (不索引 /usr/include)