diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 13:25:26 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 13:25:26 -0600 |
commit | bb726ca19f434f5055c0efceefe48d89469fcbbe (patch) | |
tree | 889782afaf67fd5acb5f222969251871c0c46e5a /numpy/_import_tools.py | |
parent | 7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff) | |
download | numpy-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/_import_tools.py')
-rw-r--r-- | numpy/_import_tools.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py index b5939cd0a..9ff9427d0 100644 --- a/numpy/_import_tools.py +++ b/numpy/_import_tools.py @@ -1,4 +1,4 @@ -from __future__ import division, absolute_import +from __future__ import division, absolute_import, print_function import os import sys @@ -262,13 +262,13 @@ class PackageLoader(object): def log(self,mess): if self.verbose>1: - print >> sys.stderr, str(mess) + print(str(mess), file=sys.stderr) def warn(self,mess): if self.verbose>=0: - print >> sys.stderr, str(mess) + print(str(mess), file=sys.stderr) def error(self,mess): if self.verbose!=-1: - print >> sys.stderr, str(mess) + print(str(mess), file=sys.stderr) def _get_doc_title(self, info_module): """ Get the title from a package info.py file. @@ -337,10 +337,10 @@ class PackageLoaderDebug(PackageLoader): def _execcmd(self,cmdstr): """ Execute command in parent_frame.""" frame = self.parent_frame - print 'Executing',`cmdstr`,'...', + print('Executing',`cmdstr`,'...', end=' ') sys.stdout.flush() exec (cmdstr, frame.f_globals,frame.f_locals) - print 'ok' + print('ok') sys.stdout.flush() return |