安裝
test.pysudo apt install python-pip
pip install tornado
vim test.py
localhost 指你所在的計算機本身。import tornado.ioloop
import tornado.web
class
mainhandler
(tornado.web.requesthandler)
:def
get(self)
: self.write(
"hello, world"
)def()
:[(r"/"
, mainhandler),]
)if __name__ ==
"__main__":)
8888
) tornado.ioloop.ioloop.current(
).start(
)
在windows系統它成了127.0.0.1的別名 ,
在unix系統下,檢視網絡卡配置會發現作為本地回環的方式,一定程度上使用localhost比127.0.0.1要快一些。
ubuntu下的小技巧
1.ubuntu下vi編輯器方向鍵變字母 1 執行命令 sudo apt get remove vim common 2 執行命令 sudo apt get install vim 2.ghex2 16進製制編輯器 rapidsvn svn 圖型介面工具 thunderbird 郵件 新聞 kdif...
ubuntu下的小技巧
1.ubuntu下vi編輯器方向鍵變字母 1 執行命令 sudo apt get remove vim common 2 執行命令 sudo apt get install vim 2.ghex2 16進製制編輯器 rapidsvn svn 圖型介面工具 thunderbird 郵件 新聞 kdif...
Ubuntu下的使用小技巧
如何去除開機自動彈出的 enter password to unlock your login keyring 對話方塊?在命令列輸入seahorse,這時會彈出乙個passwords and keys的對話方塊,右擊passwords login,選擇change password,舊密碼輸入登入...