訪問web.py官網 http://webpy.org/
根據網站步驟,利用 pip install web.py
若沒有 PIP
則先安裝pip
運行
sudo apt-get install python-pip
網站安裝python 2 ,運行python 3 則需要
pip install web.py==0.40-dev1編寫 myweb.py運行腳本import web urls = ( '/(.*)', 'hello' ) app = web.application(urls, globals()) class hello: def GET(self, name): if not name: name = 'World' return 'Hello, ' + name + '!' if __name__ == "__main__": app.run()利用python myweb.py 運行這個腳本 開啟服務也可加后面加入IP 和端口

