Salome HOME
Python3: print => print()
authorGilles DAVID <gilles-g.david@edf.fr>
Mon, 22 May 2017 13:53:20 +0000 (15:53 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Mon, 22 May 2017 13:53:20 +0000 (15:53 +0200)
src/wrappergen/src/HXX2SALOME_GENERIC_CLASS_NAME_SRC/py-compile

index d6e900b30e6c0be041761d67eebaf95637253792..f0b8e5dc63a065ba37cc71b50b283aea6a4e990e 100755 (executable)
@@ -107,40 +107,32 @@ import sys, os, string, py_compile
 
 files = '''$files'''
 
-print 'Byte-compiling python modules...'
+print('Byte-compiling python modules...')
 for file in string.split(files):
     $pathtrans
     $filetrans
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
-       continue
-    print file,
+        continue
+    print(file, end='')
     sys.stdout.flush()
     py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
+print()" || exit $?
 
 # this will fail for python < 1.5, but that doesn't matter ...
 $PYTHON -O -c "
 import sys, os, string, py_compile
 
 files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
+print('Byte-compiling python modules (optimized versions) ...')
 for file in string.split(files):
     $pathtrans
     $filetrans
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
-       continue
-    print file,
+        continue
+    print(file, end='')
     sys.stdout.flush()
     py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
+print()" 2>/dev/null || :
+