5 print "./a.py [Filename] [keyword]"
8 if not os
.path
.isfile(sys
.argv
[1]):
9 print 'File "'+sys
.argv
[1]+'" is not existent.'
12 allfile
=file(sys
.argv
[1], "r").read().splitlines()
84 keyset
= [report
, review
, ack
, test
, sof
]
85 wordkey
= ["report","review","ack","test","sof"]
89 p
=re
.compile('[1-2][0-9]{2}[0-9]-[0-9]{2}-[0-9]{2}')
91 if m
!= None and (m
.end() - m
.start()) == len(ist
):
97 p
=re
.compile('^'+r
'[^\s]*'+ist
+'.*'+":", re
.IGNORECASE
)
98 if p
.match(iss
) != None:
104 if wordkey
.count(sys
.argv
[2]) > 0:
110 if i
.count('by:') == 0:
112 for key
in keyset
[wordkey
.index(sys
.argv
[2])]:
113 if len(time
) > 0 and isstart(i
, key
):
114 print i
+'; '+'Date: '+time