https://www.cnblogs.com/jinjiangongzuoshi/p/5637793.html
http://cn-sec.com/archives/279988.html
#coding:utf-8
import fileinput
def openf():
f1= fileinput.input(files=('fail_download.log'))
#print 'ppppp:',f1.readline()
for i in f1:
print fileinput.filename() ,fileinput.lineno(),i
f1.close()
def start():
openf()
def main():
start()
if __name__ == '__main__':
main()