diff options
author | David Cournapeau <cournape@gmail.com> | 2009-12-03 15:57:03 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-12-03 15:57:03 +0000 |
commit | 8a1ba33c12bb73543a7ee29a7ec67386e1967656 (patch) | |
tree | 7675e338ac4c5375e86db43adacf277ec808dfc9 /numpy/distutils/from_template.py | |
parent | cf934f7deed917eb6a8d7bc8e160207f69c481c4 (diff) | |
download | numpy-8a1ba33c12bb73543a7ee29a7ec67386e1967656.tar.gz |
Py3k: make template generators py3k importable.
Diffstat (limited to 'numpy/distutils/from_template.py')
-rw-r--r-- | numpy/distutils/from_template.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/distutils/from_template.py b/numpy/distutils/from_template.py index 2f900b566..413f0721d 100644 --- a/numpy/distutils/from_template.py +++ b/numpy/distutils/from_template.py @@ -152,7 +152,7 @@ def expand_sub(substr,names): if r not in rules: thelist = lnames.get(r,names.get(r,None)) if thelist is None: - raise ValueError,'No replicates found for <%s>' % (r) + raise ValueError('No replicates found for <%s>' % (r)) if r not in names and not thelist.startswith('_'): names[r] = thelist rule = [i.replace('@comma@',',') for i in thelist.split(',')] @@ -165,10 +165,10 @@ def expand_sub(substr,names): elif num == numsubs: rules[r] = rule else: - print "Mismatch in number of replacements (base <%s=%s>)"\ + print("Mismatch in number of replacements (base <%s=%s>)"\ " for <%s=%s>. Ignoring." % (base_rule, ','.join(rules[base_rule]), - r,thelist) + r,thelist)) if not rules: return substr @@ -215,7 +215,7 @@ def resolve_includes(source): if not os.path.isabs(fn): fn = os.path.join(d,fn) if os.path.isfile(fn): - print 'Including file',fn + print ('Including file',fn) lines.extend(resolve_includes(fn)) else: lines.append(line) |