2013-11-11

2013-11-01

  • elleryq says: python 40 個字元寫出 http server ?! 我目前只想到可以用 python 3 的 runpy module + http.server module,這樣可以少於 40 個字元,可是執行結果失敗,跟執行 python -m http.server 的結果不一樣,server 沒起來。
    • e*****q says: 用 python3 ,然後 import os os.system("python -m http.server") 仍然要 43 個字元。
    • e*****q says: 沒辦法在指令列預先 import 好...嘖嘖...
    • i**e :: python 2.7 可以這樣:
    • i**e :: import SimpleHTTPServer as t
    • i**e :: t.test()
    • i**e :: 偷看一下文件就知道,其實直接執行該 module 就是跑該 module 的 test function
    • e*****q says: 原來如此,看來還是要翻看 SimpleHTTPServer 模組原始碼才會知道有 test() 可以用。我還傻傻的在看網路上關於 SimpleHTTPServer 的範例,想怎麼縮短。
    • e*****q says: excusemejoe: 謝謝你! :-)
  • elleryq says: vim 算字元可以用 :%s/.//gn
  • elleryq says: Thd day after tomorrow 的 Emmy Rossum 好漂亮說~現在正在看重播~

沒有留言:

張貼留言

2019-07-30

e***q says:無條件支持「看到更多吉賽兒 aka 國民老婆 aka 蓋兒加朵 (Gal Gadot) 與韓的玩命情侶走天涯電影」 真心覺得這個更有賣點! 6 年過去了我們還在等!給《玩命關頭》韓哥一個公道,戴克蕭不用踹共嗎? – 電影神搜 #JusticeForHan e...