|
[yoda-svn] yoda: merge from default for py3 compatibilityYODA Mercurial yoda at projects.hepforge.orgMon Oct 9 14:15:02 BST 2017
details: https://yoda.hepforge.org/hg/yoda/rev/732a79d6696d branches: multiweight changeset: 1423:732a79d6696d user: David Grellscheid <david.grellscheid at durham.ac.uk> date: Mon Oct 09 14:05:34 2017 +0100 description: merge from default for py3 compatibility diffs (truncated from 506 to 50 lines): --- a/bin/yodacmp Mon Oct 02 11:26:42 2017 +0200 +++ b/bin/yodacmp Mon Oct 09 14:05:34 2017 +0100 @@ -101,10 +101,10 @@ ## Apply .plot patterns first for patt, keys in plotkeys.keys(): if re.match(patt, p): - for k, v in keys.iteritems(): + for k, v in keys.items(): ao.setAnnotation(k, v) ## Then command line annotation overrides - for k, v in anns.iteritems(): + for k, v in anns.items(): ao.setAnnotation(k, v) ## Obsfucate the path for uniqueness # TODO: Tidy fname slashes etc. for this purpose @@ -117,7 +117,7 @@ ao.setAnnotation("Origin", fname) ## Add to plotting dict aolists.setdefault(p, []).append(ao) - # for p, aos in sorted(aolists.iteritems()): print p, len(aos) + # for p, aos in sorted(aolists.items()): print p, len(aos) ## Apply path pattern match discarding from dict opts.PATHPATTERNS = [re.compile(r) for r in opts.PATHPATTERNS] if opts.PATHPATTERNS else [] @@ -137,7 +137,7 @@ break if not useThis: del aolists[path] - # for p, aos in sorted(aolists.iteritems()): print p, len(aos) + # for p, aos in sorted(aolists.items()): print p, len(aos) ## Loop over unique paths, plotting in order of command-line appearance @@ -145,7 +145,7 @@ ## Now loop over all MC histograms and plot them - for path, aos in aolists.iteritems(): + for path, aos in aolists.items(): ## Find and move the reference plot has_ref = False @@ -162,10 +162,10 @@ ## ## Apply PLOT annotations from command line # TODO: also handle .plot file annotations via plotanns? - for k, v in plotanns.iteritems(): + for k, v in plotanns.items(): plot[k] = v ##
More information about the yoda-svn mailing list |