diff --git a/makehelper.py b/makehelper.py index 9952d74..0789629 100644 --- a/makehelper.py +++ b/makehelper.py @@ -11,6 +11,8 @@ PY_INCDIRS := /path ... PY_LIBDIRS := /path ... """ +from __future__ import print_function + import sys if len(sys.argv)<2: @@ -34,11 +36,11 @@ except ImportError: incdirs = [get_python_inc()]+get_numpy_include_dirs() libdirs = [get_config_var('LIBDIR')] -print >>out,'PY_VER :=',get_config_var('VERSION') -print >>out,'PY_INCDIRS :=',' '.join(incdirs) -print >>out,'PY_LIBDIRS :=',' '.join(libdirs) -print >>out,'HAVE_NUMPY :=',have_np +print('PY_VER :=',get_config_var('VERSION'), file=out) +print('PY_INCDIRS :=',' '.join(incdirs), file=out) +print('PY_LIBDIRS :=',' '.join(libdirs), file=out) +print('HAVE_NUMPY :=',have_np, file=out) -print >>out,'PY_OK := YES' +print('PY_OK := YES', file=out) out.close() diff --git a/python/devsup/hooks.py b/python/devsup/hooks.py index 8178e6f..0cf3a5d 100644 --- a/python/devsup/hooks.py +++ b/python/devsup/hooks.py @@ -1,3 +1,5 @@ +from __future__ import print_function + try: import _dbapi except ImportError: @@ -40,5 +42,5 @@ def debugHooks(): """ for h in hooknames: def _showstate(state=h): - print 'Reached state',state + print('Reached state',state) addHook(h, _showstate) diff --git a/python/devsup/util.py b/python/devsup/util.py index 7030d28..4982d54 100644 --- a/python/devsup/util.py +++ b/python/devsup/util.py @@ -1,4 +1,5 @@ +from __future__ import print_function import threading, traceback class StoppableThread(threading.Thread): @@ -161,7 +162,7 @@ class Worker(threading.Thread): try: F(*A,**K) except: - print 'Error running',F,A,K + print('Error running',F,A,K) traceback.print_exc() finally: self._update.acquire()