Python
flyforlove
这个作者很懒,什么都没留下…
展开
-
Base64解码
项目的log里有很多上传文件后的base64编码的字符串,想把它解码为原来的文件。 [code="python"] import base64 with open('c:/excelText.txt','r') as f1: s = f1.read() b = base64.decodebytes(bytes(s,encoding='UTF-8')) wit...原创 2010-10-21 12:27:48 · 177 阅读 · 0 评论 -
对比文件
用python来对比csv大文件 with open("a.csv") as f1,open("b.csv") as f2: for line1,line2 in zip(f1,f2): if (line1 != line2): items1, items2 = line1.split(","), line2.split(",") ...原创 2015-04-10 17:24:21 · 108 阅读 · 0 评论