看板 Python 關於我們 聯絡資訊
小弟使用下面方式去訪問data_path下的txt檔但速度很慢, 同樣的程式有使用過perl的File::Find去做速度很快, 感覺就是飛機與機車的速度差別,請問python有較快的module嗎? Python: for root,dirs,files in os.walk(data_path): ...... Perl: find(\&fileprocess, @book_path); sub fileprocess { .... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.133.5.111 ※ 編輯: tumc 來自: 220.133.5.111 (09/03 00:17)
AndCycle:你需要的是glob之類的 ... 09/04 02:02