###
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
domaine_1 = relief.GroupOnGeom(domaine,'domaine',SMESH.FACE)
domaine_2 = relief.GroupOnGeom(domaine,'domaine',SMESH.NODE)
smesh.SetName(relief, 'relief')
+
+med_file = r'/tmp/relief.med'
+
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
try:
- relief.ExportMED( r'/tmp/relief.med', 0, SMESH.MED_V2_2, 1, None ,1)
+ relief.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
except:
print 'ExportToMEDX() failed. Invalid file name?'
nomCas = 'etude'
# --- fichier med 2D(x,y) du cas, produit par SMESH
-fichierMaillage = '/tmp/relief.med'
+fichierMaillage = med_file
# --- dictionnaire: (clé = nom de groupe med, valeur= nom de région)
dicoGroupeRegion= dict(domaine = 'etude_Reg_1',