python 遍历文件夹文件代码
时间:2014-05-09 23:49:35
收藏:0
阅读:367
import os def tree(top): for path, names, fnames in os.walk(top): for fname in fnames: yield os.path.join(path, fname) for name in tree(‘C:\Users\XXX\Downloads\Test‘): print name
评论(0)