]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
application Patch CEA pour Home
authorpascale.noyret <pascale.noyret@edf.fr>
Wed, 30 Sep 2020 08:41:35 +0000 (10:41 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Wed, 30 Sep 2020 08:41:35 +0000 (10:41 +0200)
Adao/configuration_Adao.py
Editeur/Eficas_utils.py
InterfaceQT4/configuration.py
InterfaceQT4/qtEficas.py
Traducteur/log.py

index 02bd53905b940ff425788f6349565b694df1668b..735905fb54fbbfb573b5efd62b443a73239662da 100644 (file)
@@ -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"
index 89c601c594f53c4c63503bc5600d697cbb07f369..80951e03fb337837910d31b21a63450b786c01a0 100644 (file)
@@ -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))
index d8eefdc872237db48ab74dcafc9e41c310e0ba40..9043b0e30fdeb434ede79c3320e29b869bc3e9df 100644 (file)
@@ -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'
index f8f580ce1e96f6f804100087f4b242e65c06bbe3..555c353eef8cdac5e679e5a5833eb05db84401d5 100755 (executable)
@@ -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)
index 15b0f9c1f7d0f053ece265002b0c8f64505323fd..779a9bb5d5f30b9e6ba0c06ce2945e663d8d5a29 100644 (file)
@@ -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)