|
[yoda-svn] yoda: Python3 fixesYODA Mercurial yoda at projects.hepforge.orgWed Jan 17 14:15:02 GMT 2018
details: https://yoda.hepforge.org/hg/yoda/rev/0101a2a50d59 branches: release-1-7 changeset: 1446:0101a2a50d59 user: David Grellscheid <david.grellscheid at durham.ac.uk> date: Wed Jan 17 14:07:53 2018 +0000 description: Python3 fixes diffs (truncated from 53 to 50 lines): --- a/bin/yodadiff Tue Jan 09 14:47:47 2018 +0000 +++ b/bin/yodadiff Wed Jan 17 14:07:53 2018 +0000 @@ -31,7 +31,7 @@ if len(aodict1) != len(aodict2): CLEAN = False print("Different numbers of data objects in %s and %s" % tuple(filenames[:2])) -elif list(aodict1.keys()) != list(aodict2.keys()): +elif sorted(list(aodict1.keys())) != sorted(list(aodict2.keys())): CLEAN = False print("Different data object paths in %s and %s" % tuple(filenames[:2])) @@ -128,4 +128,4 @@ if not CLEAN: sys.exit(1) -sys.exit(0) \ No newline at end of file +sys.exit(0) --- a/bin/yodaplot Tue Jan 09 14:47:47 2018 +0000 +++ b/bin/yodaplot Wed Jan 17 14:07:53 2018 +0000 @@ -20,7 +20,7 @@ from __future__ import print_function -import os, optparse +import sys, os, optparse op = optparse.OptionParser(usage=__doc__) op.add_option("-f", "--format", dest="FORMAT", default="PDF", help="output format string consisting of desired output formats separated by commas [default=%default]") @@ -51,7 +51,11 @@ import yoda -mpl = yoda.mplinit(opts.ENGINE) +try: + mpl = yoda.mplinit(opts.ENGINE) +except AttributeError: + sys.stderr.write('YODA plotting not available. Is matplotlib installed?\n') + sys.exit(1) import matplotlib matplotlib.use('Agg') --- a/m4/ax_python_devel.m4 Tue Jan 09 14:47:47 2018 +0000 +++ b/m4/ax_python_devel.m4 Wed Jan 17 14:07:53 2018 +0000 @@ -119,7 +119,7 @@ cat << EOF > ax_python_devel_vpy.py class VPy: def vtup(self, s): - return map(int, s.strip().split(".")) + return tuple(map(int, s.strip().split(".")))
More information about the yoda-svn mailing list |