summaryrefslogtreecommitdiff
path: root/numpy/distutils/from_template.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-06 13:25:26 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-06 13:25:26 -0600
commitbb726ca19f434f5055c0efceefe48d89469fcbbe (patch)
tree889782afaf67fd5acb5f222969251871c0c46e5a /numpy/distutils/from_template.py
parent7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff)
downloadnumpy-bb726ca19f434f5055c0efceefe48d89469fcbbe.tar.gz
2to3: Apply `print` fixer.
Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
Diffstat (limited to 'numpy/distutils/from_template.py')
-rw-r--r--numpy/distutils/from_template.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/distutils/from_template.py b/numpy/distutils/from_template.py
index dc933dd6a..3547e808b 100644
--- a/numpy/distutils/from_template.py
+++ b/numpy/distutils/from_template.py
@@ -45,7 +45,7 @@ process_file(filename)
<ctypereal=float,double,\\0,\\1>
"""
-from __future__ import division, absolute_import
+from __future__ import division, absolute_import, print_function
__all__ = ['process_str','process_file']
@@ -166,10 +166,9 @@ def expand_sub(substr,names):
elif num == numsubs:
rules[r] = rule
else:
- print("Mismatch in number of replacements (base <%s=%s>)"\
- " for <%s=%s>. Ignoring." % (base_rule,
- ','.join(rules[base_rule]),
- r,thelist))
+ print("Mismatch in number of replacements (base <%s=%s>)"
+ " for <%s=%s>. Ignoring." %
+ (base_rule, ','.join(rules[base_rule]), r,thelist))
if not rules:
return substr
@@ -216,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)