X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Ffiles%2Fyacs_script_test.py;h=65f8143bad26d39b2fcca1e30cf87cd39d943d1c;hb=refs%2Ftags%2FV9_9_0rc2;hp=056b87f254237cdef9f8462929b5030a8c16070f;hpb=8d7d01c43ae1939e2d7834e4b1a3104239466b82;p=modules%2Fhomard.git diff --git a/doc/files/yacs_script_test.py b/doc/files/yacs_script_test.py index 056b87f2..65f8143b 100755 --- a/doc/files/yacs_script_test.py +++ b/doc/files/yacs_script_test.py @@ -1,6 +1,6 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright (C) 2013-2016 CEA/DEN, EDF R&D +# Copyright (C) 2013-2022 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 @@ -190,13 +190,7 @@ Controle les arguments et stockage de quelques informations # # 1.2. Le repertoire de calcul # - if "HOME" in os.environ : - HOME = os.environ ["HOME"] - else : - HOME = "/local/home/salome" -# - if ( self.rep_calc[:1] == "~" ) : - self.rep_calc = os.path.join(HOME, self.rep_calc[2:]) + self.rep_calc = os.path.expanduser(self.rep_calc) if not os.path.isdir(self.rep_calc) : self.message_info += "Repertoire " + self.rep_calc erreur = -4 @@ -209,8 +203,7 @@ Controle les arguments et stockage de quelques informations # fic = self.mesh_file # - if ( fic[:1] == "~" ) : - fic = os.path.join(HOME, fic[2:]) + fic = os.path.expanduser(fic) if not os.path.isfile(fic) : aux = os.path.join(self.rep_calc, fic) if not os.path.isfile(aux) :