Salome HOME
version 7.6.0p2 V7_6_0p2
authorCEA Support SALOME <support-salome@cea.fr>
Thu, 2 Jul 2015 10:39:06 +0000 (12:39 +0200)
committerCEA Support SALOME <support-salome@cea.fr>
Thu, 2 Jul 2015 10:39:06 +0000 (12:39 +0200)
17 files changed:
CMakeLists.txt
doc/CMakeLists.txt
doc/README
doc/conf.py.in
doc/index.rst
doc/intro.rst
resources/CMakeLists.txt
resources/SalomeApp.xml.in
resources/doc/CMakeLists.txt
resources/doc/README
src/resources/CMakeLists.txt
src/resources/LightApp_msg_en.ts
src/resources/LightApp_msg_fr.ts
src/resources/LightApp_msg_ja.ts
src/salomeContext.py
src/salomeContextUtils.py
src/tests/README

index ab6fa02e5e31ec7ced8eaee1cfa9d67dfccdd3f4..72886ee412c18e86a2f9a4f97f21c31970682a56 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
-PROJECT(Salome_SALOME_Profile C CXX)
+PROJECT(Salome_SALOME-7.6.0p2_Profile C CXX)
 
 # Ensure a proper linker behavior:
 CMAKE_POLICY(SET CMP0003 NEW)
@@ -48,7 +48,7 @@ ENDIF(EXISTS ${KERNEL_ROOT_DIR})
 # User options
 # ============
 OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
-OPTION(SALOME_BUILD_DOC "Generate SALOME SALOME documentation" ON)
+OPTION(SALOME_BUILD_DOC "Generate SALOME SALOME-7.6.0p2 documentation" ON)
 
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
@@ -69,12 +69,7 @@ SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
 IF(EXISTS ${GUI_ROOT_DIR})
   LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
   FIND_PACKAGE(SalomeGUI REQUIRED)
-  SALOME_GUI_WITH_CORBA() #remove this line if you don't need GUI module builded with CORBA
-  #remove unnecessary options from this list (see SALOME_GUI_MODE() macro description)
-  SALOME_GUI_MODE(SALOME_USE_SALOMEOBJECT SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_PYCONSOLE
-                  OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_GLVIEWER SALOME_USE_GRAPHICSVIEW 
-                  SALOME_USE_QXGRAPHVIEWER SALOME_USE_PVVIEWER SALOME_USE_PYVIEWER
-                  )
+  FULL_GUI(TRUE) # check whether GUI builded in full mode and with CORBA
   ADD_DEFINITIONS(${GUI_DEFINITIONS})
   INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
 ELSE(EXISTS ${GUI_ROOT_DIR})
@@ -90,10 +85,10 @@ INCLUDE(${QT_USE_FILE})
 # ===========
 SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH "Install path: SALOME Python scripts")
 
-# Specific to SALOME:
-SET(SALOME_SALOME_PROFILE_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/salome_profile" CACHE PATH "Install path: SALOME SALOME specific data")
-SET(SALOME_SALOME_PROFILE_INSTALL_DOC_GUI "${SALOME_INSTALL_DOC}/gui/${PROJECT_NAME_UC}" CACHE PATH "Install path: SALOME SALOME gui documentation")
-SET(SALOME_SALOME_PROFILE_HTML_STATIC_PATH "${SALOME_SALOME_PROFILE_INSTALL_DOC_GUI}/_static" CACHE PATH "Install path: SALOME SALOME html static data")
+# Specific to SALOME-7.6.0P2:
+SET(SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/salome-7.6.0p2_profile" CACHE PATH "Install path: SALOME SALOME-7.6.0P2 specific data")
+SET(SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_DOC_GUI "${SALOME_INSTALL_DOC}/gui/${PROJECT_NAME_UC}" CACHE PATH "Install path: SALOME SALOME-7.6.0P2 gui documentation")
+SET(SALOME_SALOME-7.6.0P2_PROFILE_HTML_STATIC_PATH "${SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_DOC_GUI}/_static" CACHE PATH "Install path: SALOME SALOME-7.6.0P2 html static data")
 
 MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_PYTHON)
 
@@ -116,4 +111,4 @@ SALOME_INSTALL_SCRIPTS("${_salome_context_API_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_
 SET(_salome_context_BASHRC
    ${KERNEL_ROOT_DIR}/bin/salome/appliskel/.bashrc
 )
-SALOME_INSTALL_SCRIPTS("${_salome_context_BASHRC}" $ENV{SALOME_PROFILE_ROOT_DIR})
+SALOME_INSTALL_SCRIPTS("${_salome_context_BASHRC}" $ENV{SALOME-7.6.0P2_PROFILE_ROOT_DIR})
index c8a2d79a625742fdaa50ba799e814fa26756b972..932b3e7bf235e40be8811c68d13dee8e8ffc237a 100644 (file)
@@ -25,7 +25,7 @@ SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cm
 ADD_CUSTOM_TARGET(html_docs COMMAND ${_cmd})
 
 INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target html_docs)")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${SALOME_SALOME_PROFILE_INSTALL_DOC_GUI})
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_DOC_GUI})
 
 SET(make_clean_files html doctrees)
 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}")
index 141459c205ad6e6532adba6cb072c508fac66fa8..4b0d178cf5854463d928e3f817a9299a4f8ad337 100644 (file)
@@ -1 +1 @@
-This directory contains the sources of SALOME's documentation
+This directory contains the sources of SALOME-7.6.0p2's documentation
index db93f5fd00513f02bbea2512d4fff6d351d9120f..fbcc62005eff473364423f1781dd5d1c9f114367 100644 (file)
@@ -35,7 +35,7 @@ source_suffix = '.rst'
 master_doc = 'index'
 
 # General information about the project.
-project = 'salome'
+project = 'salome-7.6.0p2'
 copyright = '2010-2015 CEA/DEN, EDF R&D, OPEN CASCADE, ASTEK INDUSTRIE'
 
 # The version info for the project you're documenting, acts as replacement for
@@ -43,9 +43,9 @@ copyright = '2010-2015 CEA/DEN, EDF R&D, OPEN CASCADE, ASTEK INDUSTRIE'
 # built documents.
 #
 # The short X.Y version.
-version = '@SALOMESALOME_MAJOR_VERSION@.@SALOMESALOME_MINOR_VERSION@'
+version = '@SALOMESALOME-7.6.0P2_MAJOR_VERSION@.@SALOMESALOME-7.6.0P2_MINOR_VERSION@'
 # The full version, including alpha/beta/rc tags.
-release = '@SALOMESALOME_VERSION@'
+release = '@SALOMESALOME-7.6.0P2_VERSION@'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -113,7 +113,7 @@ html_theme = 'default'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['@SALOME_SALOME_PROFILE_INSTALL_DOC_GUI@/_static']
+html_static_path = ['@SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_DOC_GUI@/_static']
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
@@ -151,7 +151,7 @@ html_use_modindex = False
 #html_file_suffix = ''
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'salomedoc'
+htmlhelp_basename = 'salome-7.6.0p2doc'
 
 
 # Options for LaTeX output
@@ -166,7 +166,7 @@ latex_font_size = '10pt'
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, document class [howto/manual]).
 latex_documents = [
-  ('index', 'salome.tex', 'SALOME User Documentation', 'A. Ribes', 'manual')
+  ('index', 'salome-7.6.0p2.tex', 'SALOME-7.6.0p2 User Documentation', 'A. Ribes', 'manual')
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
index 30c0efa90517fca14b2fc0c3a58b08a8f2d3ba7a..eb63bb979c4f2dd3abbd2c97911cb70a445bf856 100644 (file)
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-SALOME's documentation 
+SALOME-7.6.0p2's documentation 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 Outline
index 2b0692e31a64acd33aa1189330905711bacc7362..3aebbf70e7eec1ee9af1c630746fc0b227a0d289 100644 (file)
@@ -1,4 +1,4 @@
 Introduction
 ==========================================
 
-Welcome to SALOME's documentation!
+Welcome to SALOME-7.6.0p2's documentation!
index b1797a93cce27bda3b1eae1c46808adc377e508e..4f89f178f156f4fc689438c696299bd9e276c6bf 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 # --- resources ---
-SET(SALOME_PROFILE_RESOURCES_FILES
+SET(SALOME-7.6.0P2_PROFILE_RESOURCES_FILES
   app_icon.png
   splash.png
   about.png
@@ -27,10 +27,10 @@ SET(SALOME_PROFILE_RESOURCES_FILES
 )
 
 # --- rules ---
-INSTALL(FILES ${SALOME_PROFILE_RESOURCES_FILES} DESTINATION ${SALOME_SALOME_PROFILE_INSTALL_RES_DATA})
+INSTALL(FILES ${SALOME-7.6.0P2_PROFILE_RESOURCES_FILES} DESTINATION ${SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_RES_DATA})
 
 # --- config ---
-SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${SALOME_SALOME_PROFILE_INSTALL_RES_DATA})
+SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_RES_DATA})
 
 # --- sub-directories ---
 ADD_SUBDIRECTORY( doc )
index e3831b612ed48d1f178b283d089184ab9926f950..4e748558d06712162f5251547cb983db2516d864 100644 (file)
@@ -16,7 +16,7 @@
     <parameter name="standalone" value=""/>
   </section>
   <section name="splash">
-    <parameter name="image" value="%SALOME_PROFILE_ROOT_DIR%/share/salome/resources/salome_profile/splash.png"/>
+    <parameter name="image" value="%SALOME-7.6.0p2_PROFILE_ROOT_DIR%/share/salome/resources/salome-7.6.0p2_profile/splash.png"/>
     <parameter name="text_colors" value="#ffffff|#000000"/>
     <parameter name="show_percents" value="yes"/>
     <parameter name="show_progress" value="yes"/>
@@ -24,6 +24,6 @@
     <parameter name="font" value="Xirod,12,normal"/>
   </section>
   <section name="resources">
-    <parameter name="LightApp" value="%SALOME_PROFILE_ROOT_DIR%/share/salome/resources/salome_profile"/>
+    <parameter name="LightApp" value="%SALOME-7.6.0p2_PROFILE_ROOT_DIR%/share/salome/resources/salome-7.6.0p2_profile"/>
   </section>
 </document>
index 5852f682334781121ad73efe71a024f2f1ef567d..1a5726b930669df338c2bee754aa44ed30cd0b19 100644 (file)
@@ -24,4 +24,4 @@ SET(_bin_DOCUMENTS
    sample.pdf
 )
 
-INSTALL(FILES ${_bin_DOCUMENTS} DESTINATION ${SALOME_SALOME_PROFILE_INSTALL_DOC_GUI})
+INSTALL(FILES ${_bin_DOCUMENTS} DESTINATION ${SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_DOC_GUI})
index babce17d1b9b478065ba698c7f3121c74e2b006e..dcd4680c9d795b07c7f76dd02bc2a1657bfd490a 100644 (file)
@@ -1 +1 @@
-This directory contains binaries of SALOME's documentation
+This directory contains binaries of SALOME-7.6.0p2's documentation
index 812fddcebd1b44d726dea8ac3ffe42651ca178f0..6186b2ea0195f65db1972413a7633741d529cc9f 100644 (file)
@@ -31,4 +31,4 @@ SET(_ts_RESOURCES
 
 # --- rules ---
 
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SALOME_PROFILE_INSTALL_RES_DATA}")
+QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SALOME-7.6.0P2_PROFILE_INSTALL_RES_DATA}")
index c0733e3dbec35fdd3332a4b96ed8aaef08c1d6a5..d0421b03c4099bee7578200837f7ecfeb236f747 100644 (file)
@@ -9,15 +9,15 @@
     </message>
     <message>
         <source>ABOUT_CAPTION</source>
-        <translation>About SALOME</translation>
+        <translation>About SALOME-7.6.0p2</translation>
     </message>
     <message>
         <source>APP_NAME</source>
-        <translation>SALOME </translation>
+        <translation>SALOME-7.6.0p2 </translation>
     </message>
     <message>
         <source>APP_VERSION</source>
-        <translation>Vmaster</translation>
+        <translation>V7.6.0p2</translation>
     </message>
     <message>
         <source>ABOUT_LICENSE</source>
     </message>
     <message>
         <source>ABOUT_VERSION</source>
-        <translation>Version master</translation>
+        <translation>Version 7.6.0p2</translation>
     </message>
     <message>
         <source>ABOUT_TITLE</source>
-        <translation>SALOME</translation>
+        <translation>SALOME-7.6.0p2</translation>
     </message>
 </context>
 </TS>
index 3a9e74922ebc9e64649177c115437041c638fa9f..18954f94b165c67073bc45ebb993f250292aabd2 100644 (file)
@@ -9,15 +9,15 @@
     </message>
     <message>
         <source>ABOUT_CAPTION</source>
-        <translation>A propos de SALOME</translation>
+        <translation>A propos de SALOME-7.6.0p2</translation>
     </message>
     <message>
         <source>APP_NAME</source>
-        <translation>SALOME </translation>
+        <translation>SALOME-7.6.0p2 </translation>
     </message>
     <message>
         <source>APP_VERSION</source>
-        <translation>Vmaster</translation>
+        <translation>V7.6.0p2</translation>
     </message>
     <message>
         <source>ABOUT_LICENSE</source>
     </message>
     <message>
         <source>ABOUT_VERSION</source>
-        <translation>Version master</translation>
+        <translation>Version 7.6.0p2</translation>
     </message>
     <message>
         <source>ABOUT_TITLE</source>
-        <translation>SALOME</translation>
+        <translation>SALOME-7.6.0p2</translation>
     </message>
 </context>
 </TS>
index 7c4f98acde0ff795f159275a28d6b12f18b937b4..21d6a84a04dcc01816e48fb2dcccbb04c5a7c887 100644 (file)
@@ -9,15 +9,15 @@
     </message>
     <message>
       <source>ABOUT_CAPTION</source>
-      <translation>About SALOME</translation>
+      <translation>About SALOME-7.6.0p2</translation>
     </message>
     <message>
       <source>APP_NAME</source>
-      <translation>SALOME </translation>
+      <translation>SALOME-7.6.0p2 </translation>
     </message>
     <message>
       <source>APP_VERSION</source>
-      <translation>Vmaster</translation>
+      <translation>V7.6.0p2</translation>
     </message>
     <message>
       <source>ABOUT_LICENSE</source>
     </message>
     <message>
       <source>ABOUT_VERSION</source>
-      <translation>Version master</translation>
+      <translation>Version 7.6.0p2</translation>
     </message>
     <message>
       <source>ABOUT_TITLE</source>
-      <translation>SALOME</translation>
+      <translation>SALOME-7.6.0p2</translation>
     </message>
   </context>
 </TS>
index 545e9297925ce39ced1960ed9736ebc1813463b5..384db9bf558e2db9f42d2ea796bf35e08cf80709 100755 (executable)
@@ -33,6 +33,8 @@ import platform
 from salomeContextUtils import SalomeContextException
 
 def usage():
+  #exeName = os.path.splitext(os.path.basename(__file__))[0]
+
   msg = '''\
 Usage: salome [command] [options] [--config=<file,folder,...>]
 
@@ -49,13 +51,14 @@ Commands:
     test            Run SALOME tests.
     info            Display some information about SALOME
     help            Show this message
+    coffee          Yes! SALOME can also make coffee!!
 
 If no command is given, default to start.
 
 Command options:
 ================
     Use salome <command> --help to show help on command ; available for commands:
-    start, shell, connect, test, info.
+    start, shell, test.
 
 --config=<file,folder,...>
 ==========================
@@ -236,16 +239,13 @@ class SalomeContext:
   See usage for details on commands.
   """
   def _startSalome(self, args):
-    import os
-    import sys
     try:
-      from setenv import add_path
+      import os
       absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH')
+      import sys
       path = os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))
-      add_path(path, "PYTHONPATH")
-      path = os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome", "appliskel"))
-      add_path(path, "PYTHONPATH")
-
+      if not path in sys.path:
+        sys.path[:0] = [path]
     except:
       pass
 
@@ -330,9 +330,7 @@ class SalomeContext:
     sys.path[:0] = pythonpath
   #
 
-  def _runAppli(self, args=None):
-    if args is None:
-      args = []
+  def _runAppli(self, args=[]):
     # Initialize SALOME environment
     sys.argv = ['runSalome'] + args
     import setenv
@@ -362,9 +360,7 @@ class SalomeContext:
     return proc.communicate()
   #
 
-  def _runSession(self, args=None):
-    if args is None:
-      args = []
+  def _runSession(self, args=[]):
     sys.argv = ['runSession'] + args
     import runSession
     params, args = runSession.configureSession(args, exe="salome shell")
@@ -376,21 +372,18 @@ class SalomeContext:
     return runSession.runSession(params, args)
   #
 
-  def _runConsole(self, args=None):
-    if args is None:
-      args = []
+  def _runConsole(self, args=[]):
     # Initialize SALOME environment
-    sys.argv = ['runConsole']
+    sys.argv = ['runConsole'] + args
     import setenv
     setenv.main(True)
 
-    import runConsole
-    return runConsole.connect(args)
+    cmd = ["python", "-c", "import runConsole\nrunConsole.connect()" ]
+    proc = subprocess.Popen(cmd, shell=False, close_fds=True)
+    return proc.communicate()
   #
 
-  def _kill(self, args=None):
-    if args is None:
-      args = []
+  def _kill(self, args=[]):
     ports = args
     if not ports:
       print "Port number(s) not provided to command: salome kill <port(s)>"
@@ -427,9 +420,7 @@ class SalomeContext:
       pass
   #
 
-  def _runTests(self, args=None):
-    if args is None:
-      args = []
+  def _runTests(self, args=[]):
     sys.argv = ['runTests']
     import setenv
     setenv.main(True)
@@ -438,35 +429,9 @@ class SalomeContext:
     return runTests.runTests(args, exe="salome test")
   #
 
-  def _showInfo(self, args=None):
-    if args is None:
-      args = []
-
-    usage = "Usage: salome info [options]"
-    epilog  = """\n
-Display some information about SALOME.\n
-Available options are:
-    -p,--ports        Show list of busy ports (running SALOME instances).
-    -v,--version      Show running SALOME version.
-    -h,--help         Show this message.
-"""
-    if not args:
-      args = ["--version"]
-
-    if "-h" in args or "--help" in args:
-      print usage + epilog
-      return
-
-    if "-p" in args or "--ports" in args:
-      import PortManager
-      ports = PortManager.getBusyPorts()
-      print "SALOME instances are running on ports:", ports
-      if ports:
-        print "Last started instance on port %s"%ports[-1]
-
-    if "-v" in args or "--version" in args:
-      print "Running with python", platform.python_version()
-      self._runAppli(["--version"])
+  def _showInfo(self, unused=None):
+    print "Running with python", platform.python_version()
+    self._runAppli(["--version"])
   #
 
   def _usage(self, unused=None):
index de561cf072547f071d9a1e15c79fbf47d853f39f..12cd3a6c7f732059dd7b6f88aecff52f98c1b7fc 100755 (executable)
@@ -61,14 +61,18 @@ def __getConfigFileNamesDefault():
   return __listDirectory(envdDir)
 #
 
-def __getEnvironmentFileNames(args, optionPrefix, checkExistence):
-  # special case: extra configuration/environment files are provided by user
-  # Search for command-line argument(s) <optionPrefix>=file1,file2,..., filen
-  # Search for command-line argument(s) <optionPrefix>=dir1,dir2,..., dirn
-  configArgs = [ str(x) for x in args if str(x).startswith(optionPrefix) ]
+def getConfigFileNames(args, checkExistence=False):
+  # special case: configuration files are provided by user
+  # Search for command-line argument(s) --config=file1,file2,..., filen
+  # Search for command-line argument(s) --config=dir1,dir2,..., dirn
+  configOptionPrefix = "--config="
+  configArgs = [ str(x) for x in args if str(x).startswith(configOptionPrefix) ]
 
-  args = [ x for x in args if not x.startswith(optionPrefix) ]
-  allLists = [ x.replace(optionPrefix, '') for x in configArgs ]
+  if len(configArgs) == 0:
+    return __getConfigFileNamesDefault(), args, []
+
+  args = [ x for x in args if not x.startswith(configOptionPrefix) ]
+  allLists = [ x.replace(configOptionPrefix, '') for x in configArgs ]
 
   configFileNames = []
   unexisting = []
@@ -87,105 +91,6 @@ def __getEnvironmentFileNames(args, optionPrefix, checkExistence):
   return configFileNames, args, unexisting
 #
 
-def __validate_pair(ob):
-  try:
-    if not (len(ob) == 2):
-      #print "Unexpected result:", ob
-      raise ValueError
-  except:
-    return False
-  return True
-#
-def __get_environment_from_batch_command(env_cmd, initial=None):
-  """
-  Take a command (either a single command or list of arguments)
-  and return the environment created after running that command.
-  Note that if the command must be a batch file or .cmd file, or the
-  changes to the environment will not be captured.
-
-  If initial is supplied, it is used as the initial environment passed
-  to the child process.
-  """
-  #if not isinstance(env_cmd, (list, tuple)):
-  #    env_cmd = [env_cmd]
-  # construct the command that will alter the environment
-  #env_cmd = subprocess.list2cmdline(env_cmd)
-  # create a tag so we can tell in the output when the proc is done
-  tag = 'Done running command'
-  # construct a command to do accomplish this
-  cmd = '{env_cmd} && echo "{tag}"'.format(**vars())
-
-  # launch the process
-  proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=initial, shell=True)
-  # parse the output sent to stdout
-  lines = proc.stdout
-  # consume whatever output occurs until the tag is reached
-  #consume(itertools.takewhile(lambda l: tag not in l, lines))
-  # define a way to handle each KEY=VALUE line
-  handle_line = lambda l: l.rstrip().split('=',1)
-  # parse key/values into pairs
-  #pairs = map(handle_line, lines)
-  pairs = []
-  cpt = 0
-  while True:
-    line = lines.readline()
-    cpt = cpt+1
-    if tag in line or cpt > 1000:
-      break
-    if line:
-      pairs.append(line.rstrip().split('=',1))
-  # make sure the pairs are valid
-  valid_pairs = filter(__validate_pair, pairs)
-  # construct a dictionary of the pairs
-  result = dict(valid_pairs)
-  # let the process finish
-  proc.communicate()
-  return result
-#
-def __subtract(ref, dic):
-  result = {}
-  for key,val in ref.items():
-    if not dic.has_key(key):
-      result[key] = val
-    else:
-      # compare values types
-      if (type(dic[key]) != type(val)):
-        result[key] = val
-      else:
-        # compare values
-        if isinstance(val, basestring):
-          tolist1 = dic[key].split(os.pathsep)
-          tolist2 = val.split(os.pathsep)
-          diff = list(set(tolist2)-set(tolist1))
-          if diff:
-            result[key] = os.pathsep.join(diff)
-        else:
-          result[key] = val
-
-  return result
-#
-
-def getConfigFileNames(args, checkExistence=False):
-  configOptionPrefix = "--config="
-  configArgs = [ str(x) for x in args if str(x).startswith(configOptionPrefix) ]
-  if len(configArgs) == 0:
-    configFileNames, unexist1 = __getConfigFileNamesDefault(), []
-  else:
-    # get configuration filenames
-    configFileNames, args, unexist1 = __getEnvironmentFileNames(args, configOptionPrefix, checkExistence)
-
-  # get extra environment
-  extraEnvFileNames, args, unexist2 = __getEnvironmentFileNames(args, "--extra_env=", checkExistence)
-  before = __get_environment_from_batch_command("env")
-  after = {}
-  for filename in extraEnvFileNames:
-    after.update(__get_environment_from_batch_command(filename))
-    pass
-
-  extraEnv = __subtract(after,before)
-  return configFileNames, extraEnv, args, unexist1+unexist2
-#
-
 def __getScriptPath(scriptName, searchPathList):
   scriptName = os.path.expanduser(scriptName)
   if os.path.isabs(scriptName):
@@ -228,9 +133,7 @@ class ScriptAndArgsObjectEncoder(json.JSONEncoder):
       return json.JSONEncoder.default(self, obj)
 #
 
-def getShortAndExtraArgs(args=None):
-  if args is None:
-    args = []
+def getShortAndExtraArgs(args=[]):
   try:
     pos = args.index("--") # raise a ValueError if not found
     short_args = args[:pos]
@@ -244,9 +147,7 @@ def getShortAndExtraArgs(args=None):
 #
 
 # Return an array of ScriptAndArgs objects
-def getScriptsAndArgs(args=None, searchPathList=None):
-  if args is None:
-    args = []
+def getScriptsAndArgs(args=[], searchPathList=None):
   short_args, extra_args = getShortAndExtraArgs(args)
   args = short_args
 
index 4976f7ef3d31f631879b08de451de73ff70dede9..be2a5787d8fa3aaa9052e28abf0bf73f749f8b07 100644 (file)
@@ -1 +1 @@
-This directory contains the tests of SALOME
+This directory contains the tests of SALOME-7.6.0p2