作者查詢 / grapherd

總覽項目: 發文 | 留言 | 暱稱
作者 grapherd 在 PTT [ Python ] 看板的留言(推文), 共73則
限定看板:Python
[問題] urllib2可以開啟多檔案嗎?
[ Python ]25 留言, 推噓總分: 0
作者: darklimit - 發表於 2013/04/11 19:10(12年前)
1Fgrapherd:import glob; html_list = glob.glob("*.htm*")04/11 19:36
2Fgrapherd:html_list = map(lambda x: open(x), html_list)04/11 19:37
3Fgrapherd:讀取local的html應該不用用到urllib2, 用open就夠了04/11 19:37
8Fgrapherd:改用urllib.urlopen就可以了,不過效果跟open是一樣的04/11 22:26
9Fgrapherd:不知道你是用什麼html parser?04/11 22:28
18Fgrapherd:這樣當然錯誤了,資料夾內沒有 "*.html"這個檔案啊04/11 23:04
21Fgrapherd:用最上面的方法,然後把open(x)改成open(x).read()04/11 23:05
23Fgrapherd:然後 html_list 內的資料就是每一個html file的字串了04/11 23:05
[資訊] Taipei.py April Meeting 2013
[ Python ]9 留言, 推噓總分: +4
作者: timTan - 發表於 2013/04/08 12:51(12年前)
1Fgrapherd:說到nltk, 昨天在pypi上看到jieba還滿好玩的~04/08 19:24
[討論] 請教中文處理
[ Python ]4 留言, 推噓總分: 0
作者: Gjoy - 發表於 2013/04/04 19:30(12年前)
2Fgrapherd:pyUnihan:http://ppt.cc/mx8w 從unihan資料庫做的04/05 01:59
3Fgrapherd:還有看到一個cjklib: http://ppt.cc/RLy~04/05 01:59
[問題] Django的架站平台
[ Python ]41 留言, 推噓總分: +5
作者: Yukirin - 發表於 2013/04/04 12:39(12年前)
38Fgrapherd:請問各位,如果佈署在DigitalOcean or Linode上面,需要04/16 18:40
39Fgrapherd:需要設定 iptables 嗎?04/16 18:40
[問題] Python GUI 如何渲染 HTML
[ Python ]3 留言, 推噓總分: 0
作者: danny0838 - 發表於 2013/03/29 12:22(12年前)
3Fgrapherd:如果是wxPython, 可以用wxHtmlWindow03/29 17:52
[問題] 相同的程式碼換電腦後就出現SyntaxError
[ Python ]7 留言, 推噓總分: +1
作者: b98204030 - 發表於 2013/03/21 13:31(12年前)
4Fgrapherd:把report_does_not_hav 放到 nth_element上面看看03/21 22:03
5Fgrapherd:......兩個函數名稱錯了而已..03/21 22:04
[問題] tkinter and turtle multithread
[ Python ]3 留言, 推噓總分: 0
作者: largesperm - 發表於 2013/02/14 00:26(12年前)
2Fgrapherd:第一個問題用timer更新, http://ppt.cc/HgRV02/16 11:56
[問題] 讀取檔案問題
[ Python ]3 留言, 推噓總分: +1
作者: blackspace98 - 發表於 2013/01/24 20:10(13年前)
1Fgrapherd:第一個用'\n'來split,第二個用 ','來split, 寫個函式01/24 20:17
2Fgrapherd:read_in("test.txt", sep = '\n') read_in(sep=",") 這樣01/24 20:18
[問題] 萬用字元
[ Python ]7 留言, 推噓總分: 0
作者: blackspace98 - 發表於 2013/01/09 16:02(13年前)
1Fgrapherd:import glob; glob.glob("*.txt")01/09 16:07
3Fgrapherd:根據Document *1, Python對路徑位置不使用萬用字元,01/09 18:16
4Fgrapherd:但是 glob 模組調用 fnmatch模組, 所以可以使用萬用字元01/09 18:17
5Fgrapherd:*1: http://ppt.cc/FNIl, glob: http://ppt.cc/4VJ_01/09 18:19
6Fgrapherd:fnmatch: http://ppt.cc/fkEt01/09 18:20
Re: [資訊] checkio,一個線上的python解題競賽網站
[ Python ]4 留言, 推噓總分: +3
作者: dadadavid - 發表於 2013/01/09 15:32(13年前)
1Fgrapherd:如果要挑戰難題,SPOJ是很好的選擇, http://www.spoj.com01/09 18:23
2Fgrapherd:支援48種程式語言,包含Python01/09 18:24