Salome HOME
PYTHON3: write bytes
authorGilles DAVID <gilles-g.david@edf.fr>
Mon, 27 Mar 2017 11:41:34 +0000 (13:41 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Mon, 27 Mar 2017 11:41:34 +0000 (13:41 +0200)
bin/appli_gen.py
bin/virtual_salome.py

index f78d20d2458d86d0901502daeb0d5962d40762ca..7461a315765c3e36624c2fe9cd9906eb779b3487 100644 (file)
@@ -1,5 +1,4 @@
 #! /usr/bin/env python
-#  -*- coding: iso-8859-1 -*-
 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
index 1be8dbf8e71b9338ac85049b7f3f56073390b771..120228c4d7693c7334990c3aa15b7e01e725961d 100755 (executable)
@@ -1,4 +1,3 @@
-#  i*- coding: iso-8859-1 -*-
 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
@@ -20,7 +19,6 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-
 """Create a virtual Salome installation
 
 Based on a script created by Ian Bicking.
@@ -32,7 +30,9 @@ Typical use::
 install module KERNEL in the current directory
 """
 
-import sys, os, optparse, shutil,glob,fnmatch
+import sys, os, optparse, shutil, glob, fnmatch
+
+
 py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1])
 
 verbose=0
@@ -380,7 +380,8 @@ def link_extra_test(options):
         symlink(extra_test_dir, os.path.join(test_dir, options.extra_test_name))
         # register extra_test for testing in CTestTestfile.cmake
         with open(os.path.join(test_dir, "CTestTestfile.cmake"), "ab") as f:
-            f.write("SUBDIRS(%s)\n"%options.extra_test_name)
+            aStr = "SUBDIRS(%s)\n" % options.extra_test_name
+            f.write(aStr.encode())
     else:
         if verbose:
             print(extra_test_dir, " doesn't exist")