X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2Fsmesh_setenv.py;h=a2af9d7160a6bd9a81bb9be8fce335eaa3f9f58b;hb=4646393f6cca6e3d29aec0bd5dc7778c7da5ee97;hp=ad3d2df9bf77274ca39af93f9743435d6b9f2dcd;hpb=84cf6c491178cc4cea1be9c8b2ba4d13750d02a3;p=modules%2Fsmesh.git diff --git a/bin/smesh_setenv.py b/bin/smesh_setenv.py index ad3d2df9b..a2af9d716 100644 --- a/bin/smesh_setenv.py +++ b/bin/smesh_setenv.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- +#!/usr/bin/env python3 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -30,7 +29,7 @@ def set_env(args): python_version="python%d.%d" % sys.version_info[0:2] - if not os.environ.has_key("SALOME_StdMeshersResources"): + if "SALOME_StdMeshersResources" not in os.environ: os.environ["SALOME_StdMeshersResources"] \ = os.path.join(os.environ["SMESH_ROOT_DIR"],"share",salome_subdir,"resources","smesh") pass @@ -38,7 +37,7 @@ def set_env(args): # find plugins plugin_list = ["StdMeshers"] resource_path_list = [] - for env_var in os.environ.keys(): + for env_var in list(os.environ.keys()): value = os.environ[env_var] if env_var[-9:] == "_ROOT_DIR" and value: plugin_root = value @@ -61,7 +60,7 @@ def set_env(args): # add paths of plugin plugin_list.append(plugin) - if not os.environ.has_key("SALOME_"+plugin+"Resources"): + if "SALOME_"+plugin+"Resources" not in os.environ: resource_path = os.path.join(plugin_root,"share",salome_subdir,"resources",plugin.lower()) os.environ["SALOME_"+plugin+"Resources"] = resource_path resource_path_list.append( resource_path )