X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2Fparavis_setenv.py;h=7d8fe196dab92b2a329321a6598bb52e7565a797;hb=7f6b6b47c94b937bf2f87c286f5bd428e7c32b5a;hp=43dffa5d200061ca1ffd42559255626d321c237f;hpb=f97aa0a72a48a5411faa8d0defd3cf4b54f4c305;p=modules%2Fparavis.git diff --git a/bin/paravis_setenv.py b/bin/paravis_setenv.py index 43dffa5d..7d8fe196 100644 --- a/bin/paravis_setenv.py +++ b/bin/paravis_setenv.py @@ -1,6 +1,6 @@ #! /usr/bin/env python # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D +# Copyright (C) 2007-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -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