From 9f45a24c0f213c096d768faa265213fee83d5684 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 30 Sep 2020 12:24:42 +0200 Subject: [PATCH] chgt mineur patchs CEA --- InterfaceQT4/configuration.py | 25 ++++++++++++------------- InterfaceQT4/qtEficas.py | 9 ++++----- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 9043b0e3..8b1f5c6f 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -62,11 +62,11 @@ class configBase(object): self.repIni = repIni if self.code == None : self.code='' - if sys.platform[0:5]=="linux" : + self.rep_user = os.path.join(os.path.expanduser("~"),'.config/Eficas',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.path.expanduser("~"),'.config/Eficas',self.code) - else : - self.rep_user = os.path.join('C:/','.config/Eficas',self.code) + #else : + # self.rep_user = os.path.join('C:/','.config/Eficas',self.code) self.setValeursParDefaut() @@ -87,11 +87,11 @@ class configBase(object): #else: self.parent=None if not os.path.isdir(self.savedir) : - if sys.platform[0:5]=="linux" : + self.savedir=os.path.expanduser("~") + #if sys.platform[0:5]=="linux" : #self.savedir=os.environ['HOME'] - self.savedir=os.path.expanduser("~") - else: - self.savedir='C:/' + #else: + # self.savedir='C:/' @@ -103,12 +103,11 @@ class configBase(object): self.path_doc = os.path.abspath(os.path.join(self.repIni,'..','Doc')) self.exec_acrobat = 'acroread' nomDir="Eficas_"+self.code - if sys.platform[0:5]=="linux" : + self.savedir = os.path.abspath(os.path.join(os.path.expanduser("~"),nomDir)) + #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.path.expanduser("~"),nomDir)) - - else: - self.savedir = os.path.abspath('C:/') + #else: + # self.savedir = os.path.abspath('C:/') self.modeNouvCommande='initial' self.affiche="alpha" self.closeAutreCommande = False diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 555c353e..b1650497 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -672,12 +672,11 @@ class Appli(AppliSsIhm,Ui_Eficas,QMainWindow): def initRecents(self): self.recent = [] try : - if sys.platform[0:5]=="linux" : + rep=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) + #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) + #else : + # rep=os.path.join('C:/','.config/Eficas',self.code) monFichier=rep+"/listefichiers_"+self.code index=0 f=open(monFichier) -- 2.39.2