摘要: 为了熟悉python的文件读写,写了一个小程序#coding=utf-8import osimport sysimport ref1 = open('xxx.log','r')f2 = open('temp.txt','w')lines = f1.readlines()num = 0for line in lines: if line[0]=='2' and line[1]=='0' and line[2]=='1' and line[4]=='-': f2.writ 阅读全文
posted @ 2012-10-30 14:09 聂风 阅读(245) 评论(0) 推荐(0) 编辑