]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
bos #18341: HOME environment variable
authorjfa <jfa@opencascade.com>
Tue, 14 Apr 2020 08:47:24 +0000 (11:47 +0300)
committervsr <vsr@opencascade.com>
Wed, 13 May 2020 14:11:19 +0000 (17:11 +0300)
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/MGCleanerMonViewText.py
src/Tools/Verima/Base/versions.py
src/Tools/Verima/Stats/job.py
src/Tools/YamsPlug/monViewText.py
src/Tools/YamsPlug/monYamsPlugDialog.py

index 38fb62f52de4882442428c38199c2f25049609f7..ec87a6f82a00921f1ca228721a0f6f58f90f0bf5 100644 (file)
@@ -69,7 +69,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     self.PB_MeshFile.setToolTip("source mesh from a file in disk")
 
     #Ces parametres ne sont pas remis a rien par le clean
-    self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGCleaner.dat"))
+    self.paramsFile= os.path.abspath(os.path.join(os.path.expanduser("~"),".MGCleaner.dat"))
     self.LE_ParamsFile.setText(self.paramsFile)
     self.LE_MeshFile.setText("")
     self.LE_MeshSmesh.setText("")
index c45e4cdf5244f817c2ccabb2a19077e4d69536f8..d9a909318772efe19d41361fdeab944e6bae464c 100644 (file)
@@ -81,7 +81,7 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog):
 
     def saveFile(self):
         #recuperation du nom du fichier
-        savedir=os.environ['HOME']
+        savedir=os.path.expanduser("~")
         fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir)
         if not fn: return
         ulfile = os.path.abspath(str(fn))
index bb2373b3db62d22396e8b9138b93e162dfedb424..7936dc3eada6c84dac8efcb89bc5108979b4c919 100755 (executable)
@@ -24,7 +24,7 @@ import  subprocess
 
 
 def Chercheversion(salomePath):
-    home=os.environ['HOME']
+    home=os.path.expanduser("~")
     commande=os.path.abspath(os.path.join(home,salomePath,'salome'))
     argus="--version"
     p = subprocess.Popen([commande,argus], stdout=subprocess.PIPE)
index 97c6e6134658f406725398c12be72978affd3ec7..837dab49b627d7c4fcd81fafdcea0bf1b67663f2 100644 (file)
@@ -36,7 +36,7 @@ class Job:
 
       
   def execute(self):
-      home=os.environ['HOME']
+      home=os.path.expanduser("~")
       commande=os.path.abspath(os.path.join(home,self.salomePath,"salome"))
       script= os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',self.script)) 
 
index f75615f81c9b1c6ae0edb4830936530f78bbf6fb..d53848354b46a6f201ffbd47a61fb3de63d9ceac 100644 (file)
@@ -80,7 +80,7 @@ class MonViewText(Ui_ViewExe, QDialog):
 
     def saveFile(self):
         #recuperation du nom du fichier
-        savedir=os.environ['HOME']
+        savedir=os.path.expanduser("~")
         fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir)
         if not fn: return
         ulfile = os.path.abspath(str(fn))
index bfdc2811cd9c95d3078d4e8eb84d052928d55595..01ecff0639af2a20660f00ba407db97d7431b14c 100644 (file)
@@ -69,7 +69,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     self.PB_MeshFile.setToolTip("source mesh from a file in disk")
 
     #Ces parametres ne sont pas remis a rien par le clean
-    self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGSurfOpt.dat"))
+    self.paramsFile= os.path.abspath(os.path.join(os.path.expanduser("~"),".MGSurfOpt.dat"))
     self.LE_ParamsFile.setText(self.paramsFile)
     self.LE_MeshFile.setText("")
     self.LE_MeshSmesh.setText("")