Jghost

jeiao, In me the tiger sniffs the rose !

导航

2014年4月3日 #

python 遍历指定文件夹下的所有文件内容

摘要: 最近公司代码需要做版权审查需要一些代码,足足60页的word文档,如果一个一个文件的copy代码 就真是out,最近在学习python,就写了个python的脚本,方便上面操作。__author__ = 'jghost'import osfor root,dirs,files in os.walk('your source'): print root #path for name in files: if name.endswith('.java'): dic = open('/home/jghost/filefilter.txt' 阅读全文

posted @ 2014-04-03 15:42 Jghost 阅读(775) 评论(0) 推荐(0) 编辑