标签:pre txt code with open 文本 文本文件 src python read
#myhaspl@myhaspl.com
fId=1
with open("tf-allsrc.txt","r") as sf:
while True:
with open("tf-src-"+str(fId)+".txt","w+") as f:
data=sf.read(1024*1024*5)
if not data:
break
f.write(data)
print(fId,"#",end=".")
fId+=1
标签:pre txt code with open 文本 文本文件 src python read
原文地址:http://blog.51cto.com/13959448/2315866