Salome HOME
- Major update for launcher:
[modules/kernel.git] / bin / salome_utils.py
index 08407f420cc2d1a86e1e2e4c1211406f3ed60a76..63c36ff80b015b9a8a6cad843b29cfa22d65deba 100644 (file)
@@ -1,7 +1,5 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#  -*- coding: iso-8859-1 -*-
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # ---
 # File   : salome_utils.py
 # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
 # ---
-#
+
 ## @package salome_utils
 # \brief Set of utility functions used by SALOME python scripts.
-#
-#
 
 #
 # Exported functions
 #
+
 __all__ = [
     'getORBcfgInfo',
     'getHostFromORBcfg',
@@ -365,8 +363,8 @@ def makeTmpDir( path, mode=0777 ):
     if os.path.exists( path ):
         import sys
         if sys.platform == "win32":
-            os.system( "rmdir /S /Q " + path )
-            os.system( "mkdir " + path )
+            os.system( "rmdir /S /Q " + '"' + path + '"' )
+            os.system( "mkdir " + '"' + path + '"' )
         else:
             os.system( "rm -rf " + path + "/*" )
             pass
@@ -420,7 +418,7 @@ def uniteFiles( src_file, dest_file ):
 
         import sys
         if sys.platform == "win32":
-            command = "type " + src_file + " >> " + dest_file
+            command = "type " + '"' + src_file + '"' + " >> " + '"' + dest_file + '"'
         else:
             command = "cat " + src_file + " >> " + dest_file
             pass
@@ -428,7 +426,7 @@ def uniteFiles( src_file, dest_file ):
     else:
         import sys
         if sys.platform == "win32":
-            command = "copy " + src_file + " " + dest_file + " > nul"
+            command = "copy " + '"' + src_file + '"' + " " + '"' + dest_file + '"' + " > nul"
         else:
             command = "cp " + src_file + " " + dest_file
             pass