-# 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',
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
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
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