# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2014 EDF R&D
+# Copyright (C) 2013-2016 EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Modules Eficas
import os, subprocess
+import tempfile
from MGCleanerPlugDialog_ui import Ui_MGCleanerPlugDialog
from MGCleanerMonViewText import MGCleanerMonViewText
from PyQt4.QtGui import *
self.PB_MeshFile.setIcon(icon)
self.PB_MeshFile.setToolTip("source mesh from a file in disk")
- #Ces parametres ne sont pas remis à rien par le clean
+ #Ces parametres ne sont pas remis ?? rien par le clean
self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGCleaner.dat"))
self.LE_ParamsFile.setText(self.paramsFile)
self.LE_MeshFile.setText("")
self.fichierIn=""
def prepareFichier(self):
- self.fichierIn="/tmp/ForMGCleaner_"+str(self.num)+".mesh"
+ self.fichierIn=tempfile.mktemp(suffix=".mesh",prefix="ForMGCleaner_")
+ if os.path.exists(self.fichierIn):
+ os.remove(self.fichierIn)
self.__selectedMesh.ExportGMF(self.__selectedMesh, self.fichierIn, True)
def PrepareLigneCommande(self):