def main( ):
parser = get_opt_parser( )
opts = parser.parse_args( )
tw_opts = {
'width': 50,
'subsequent_indent': ' ',
'initial_indent': ' ',
}
wrapper = textwrap.TextWrapper(**tw_opts)
for stream in opts.infile:
print "## START %s" % (stream.name)
records = find_dates(stream)
i = 0
for record in records:
prefix = '#### RECORD {} {}'.format(i, str(record))
# record.pformat(prefix)
i += 1
print "`end %s: %s records`" % (stream.name, len(records))
stream.close( )
评论列表
文章目录