From: pascale.noyret Date: Wed, 30 Sep 2020 08:41:35 +0000 (+0200) Subject: application Patch CEA pour Home X-Git-Tag: V9_6_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0ef36a4bd89365f2c4870cbc2bd5e12bfd199470;p=tools%2Feficas.git application Patch CEA pour Home --- diff --git a/Adao/configuration_Adao.py b/Adao/configuration_Adao.py index 02bd5390..735905fb 100644 --- a/Adao/configuration_Adao.py +++ b/Adao/configuration_Adao.py @@ -43,7 +43,8 @@ class CONFIG(configuration.configBase): self.labels_eficas=['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille'] configuration.configBase.__init__(self,appli,repIni) - self.rep_user = os.environ["HOME"] + #self.rep_user = os.environ["HOME"] + self.rep_user = os.path.expanduser("~") self.appli = appli self.code = appli.code # self.lang = "fr" diff --git a/Editeur/Eficas_utils.py b/Editeur/Eficas_utils.py index 89c601c5..80951e03 100644 --- a/Editeur/Eficas_utils.py +++ b/Editeur/Eficas_utils.py @@ -44,7 +44,8 @@ def getRepUser(dir): le repertoire de l'utilisateur /$home/Eficas_install """ - rep_user_eficas= os.path.join(os.environ['HOME'],dir) + #rep_user_eficas= os.path.join(os.environ['HOME'],dir) + rep_user_eficas= os.path.join(os.path.expanduser("~"),dir) if os.path.exists(rep_user_eficas): if os.path.isfile(rep_user_eficas) : print (tr("Un fichier de nom %s existe deja : impossible de creer un repertoire de meme nom", rep_user_eficas)) diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index d8eefdc8..9043b0e3 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -63,7 +63,8 @@ class configBase(object): if self.code == None : self.code='' if sys.platform[0:5]=="linux" : - self.rep_user = os.path.join(os.environ['HOME'],'.config/Eficas',self.code) + #self.rep_user = os.path.join(os.environ['HOME'],'.config/Eficas',self.code) + self.rep_user = os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) else : self.rep_user = os.path.join('C:/','.config/Eficas',self.code) @@ -87,7 +88,8 @@ class configBase(object): if not os.path.isdir(self.savedir) : if sys.platform[0:5]=="linux" : - self.savedir=os.environ['HOME'] + #self.savedir=os.environ['HOME'] + self.savedir=os.path.expanduser("~") else: self.savedir='C:/' @@ -102,7 +104,9 @@ class configBase(object): self.exec_acrobat = 'acroread' nomDir="Eficas_"+self.code if sys.platform[0:5]=="linux" : - self.savedir = os.path.abspath(os.path.join(os.environ['HOME'],nomDir)) + #self.savedir = os.path.abspath(os.path.join(os.environ['HOME'],nomDir)) + self.savedir = os.path.abspath(os.path.join(os.path.expanduser("~"),nomDir)) + else: self.savedir = os.path.abspath('C:/') self.modeNouvCommande='initial' diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index f8f580ce..555c353e 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -673,6 +673,8 @@ class Appli(AppliSsIhm,Ui_Eficas,QMainWindow): self.recent = [] try : if sys.platform[0:5]=="linux" : + #rep=os.path.join(os.environ['HOME'],'.config/Eficas',self.code) + rep=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) rep=os.path.join(os.environ['HOME'],'.config/Eficas',self.code) else : rep=os.path.join('C:/','.config/Eficas',self.code) diff --git a/Traducteur/log.py b/Traducteur/log.py index 15b0f9c1..779a9bb5 100644 --- a/Traducteur/log.py +++ b/Traducteur/log.py @@ -24,7 +24,8 @@ logger=logging.getLogger() def initialise(flog=None): if flog == None : - MonHome=os.environ['HOME'] + #MonHome=os.environ['HOME'] + MonHome=os.path.expanduser("~") MaDir=MonHome+"/Eficas_install" try : os.mkdir(MaDir)