#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright (C) 2013-2019 CEA/DEN, EDF R&D
+# Copyright (C) 2013-2023 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# 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
#
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) :