Salome HOME
0023235: [CEA 1730] Patches for SMESH on Windows
[modules/smesh.git] / src / Tools / YamsPlug / monYamsPlugDialog.py
index e8a792571710176ac7ab3064c2269b6a1a4cc390..37a15f6cc591b6ded93d34d83430cbd8253c8c4c 100644 (file)
@@ -22,6 +22,7 @@
 # Modules Eficas
 
 import os, subprocess
+import tempfile
 from YamsPlugDialog_ui import Ui_YamsPlugDialog
 from monViewText import MonViewText
 from PyQt4.QtGui import *
@@ -430,7 +431,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     self.fichierIn=""
 
   def prepareFichier(self):
-    self.fichierIn="/tmp/ForSurfOpt_"+str(self.num)+".meshb"
+    self.fichierIn=tempfile.mktemp(suffix=".meshb",prefix="ForSurfOpt_")
+    if os.path.exists(self.fichierIn):
+        os.remove(self.fichierIn)
     self.__selectedMesh.ExportGMF(self.__selectedMesh, self.fichierIn, True)
 
   def PrepareLigneCommande(self):