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"
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))
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)
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:/'
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'
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)
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)