标签:file hud read roo pac rip close files pat
startswith和endswith(以xxx开头,以xxx结尾):注:
以.pac.gz结尾:if g.endswith(‘.pac.gz‘):
#!/usr/bin/python
import os
d = open(‘/log/110Hud/tjpacgms.txt‘,‘r‘)
for e in d.readlines():
d.close()
for root,dirs,files in os.walk(e.strip()):
for g in files:
if g.endswith(‘.pac.gz‘):
o = open(‘/log/110Hud/tjpacgms3.txt‘,‘a‘)
o.write(os.path.join(root,g)+"\n")
o.close()
:wq
startswith和endswith(以xxx开头,以xxx结尾)
标签:file hud read roo pac rip close files pat
原文地址:http://blog.51cto.com/yangzhiming/2133022