From b838c36205acb63a53d24b08e5780b4ed7e0db97 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 30 Oct 2014 11:16:36 +0300 Subject: [PATCH] Set properly PARAVIS environment in runtime on Windows --- bin/paravis_setenv.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/paravis_setenv.py b/bin/paravis_setenv.py index 43dffa5d..3dfd553e 100644 --- a/bin/paravis_setenv.py +++ b/bin/paravis_setenv.py @@ -19,7 +19,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -import os, re +import os, re, sys # ----------------------------------------------------------------------------- @@ -27,9 +27,13 @@ def set_env( args ): """Initialize environment of PARAVIS module""" # set PV_PLUGIN_PATH to PARAVIS plug-ins paravis_plugin_dir = os.path.join( os.getenv( "PARAVIS_ROOT_DIR" ), "lib", "paraview" ) - plugin_path = re.split( ":|;", os.getenv( 'PV_PLUGIN_PATH', paravis_plugin_dir ) ) + if sys.platform == "win32": + splitsym = splitre = ";" + else: + splitsym = ":"; splitre = ":|;" + plugin_path = re.split( splitre, os.getenv( 'PV_PLUGIN_PATH', paravis_plugin_dir ) ) if paravis_plugin_dir not in plugin_path: plugin_path[0:0] = [paravis_plugin_dir] - os.environ['PV_PLUGIN_PATH'] = ";".join(plugin_path) + os.environ['PV_PLUGIN_PATH'] = splitsym.join(plugin_path) pass -- 2.39.2