lhapdf

view testinfo @ 1110:2ba52dbf2312

Add release instructions for new sets
author Andy Buckley <andy@insectnation.org>
date Tue, 17 Oct 2017 17:12:04 +0100
parents 296547ff3add
children
line source
1 #! /usr/bin/env python
3 import argparse
4 ap = argparse.ArgumentParser()
5 ap.add_argument("IFILES", metavar="PATH", nargs="+", help="info files to process")
6 ap.add_argument("-v", "--verbose", dest="VERBOSE", action="store_true", help="print on successful parses, too")
7 args = ap.parse_args()
9 import yaml
10 for ifile in args.IFILES:
11 try:
12 with open(ifile) as f:
13 doc = yaml.load(f)
14 if args.VERBOSE:
15 dv = doc.get("DataVersion")
16 print "Successfully parsed '%s': data version = %s" % (ifile, dv)
17 except Exception, e:
18 print "Error parsing '%s': %s" % (ifile, e)