if fd.exec_():
infile = fd.selectedFiles()[0]
self.LE_MeshFile.setText(infile)
- self.fichierIn=str(infile).encode("latin-1")
+ self.fichierIn=str(infile)
self.MeshIn=""
self.LE_MeshSmesh.setText("")
+ self.__selectedMesh=None
def setParamsFileName(self):
fd = QFileDialog(self, "select a file", self.LE_ParamsFile.text(), "dat Files (*.dat);;All Files (*)")
if fd.exec_():
infile = fd.selectedFiles()[0]
self.LE_ParamsFile.setText(infile)
- self.paramsFile=str(infile).encode("latin-1")
+ self.paramsFile=str(infile)
def meshFileNameChanged(self):
self.fichierIn=str(self.LE_MeshFile.text())
def saveFile(self):
#recuperation du nom du fichier
savedir=os.environ['HOME']
- fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir)
- if fn.isNull() : return
+ fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir)
+ if not fn: return
ulfile = os.path.abspath(str(fn))
try:
- f = open(fn, 'wb')
- f.write(str(self.TB_Exe.toPlainText()))
- f.close()
+ f = open(fn, 'wb')
+ f.write(self.TB_Exe.toPlainText().encode("utf-8"))
+ f.close()
except IOError as why:
- QMessageBox.critical(self, self.trUtf8('Save File'),
- self.trUtf8('The file <b>%1</b> could not be saved.<br>Reason: %2')
- .arg(str(fn)).arg(str(why)))
+ QMessageBox.critical(self, 'Save File',
+ 'The file <b>%s</b> could not be saved.<br>Reason: %s'%(str(fn), str(why)))
def readFromStdErr(self):
a=self.monExe.readAllStandardError()
def saveFile(self):
#recuperation du nom du fichier
savedir=os.environ['HOME']
- fn = QFileDialog.getSaveFileName(None,"Save File",savedir)
- if fn.isNull() : return
+ fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir)
+ if not fn: return
ulfile = os.path.abspath(str(fn))
try:
f = open(fn, 'wb')
- f.write(str(self.TB_Exe.toPlainText()))
+ f.write(self.TB_Exe.toPlainText().encode("utf-8"))
f.close()
except IOError as why:
QMessageBox.critical(self, 'Save File',
- 'The file <b>%1</b> could not be saved.<br>Reason: %2'%(str(fn), str(why)))
+ 'The file <b>%s</b> could not be saved.<br>Reason: %s'%(str(fn), str(why)))
def readFromStdErr(self):
a=self.monExe.readAllStandardError()
if fd.exec_():
infile = fd.selectedFiles()[0]
self.LE_MeshFile.setText(infile)
- self.fichierIn=str(infile).encode("latin-1")
+ self.fichierIn=str(infile)
self.MeshIn=""
self.LE_MeshSmesh.setText("")
+ self.__selectedMesh=None
def setParamsFileName(self):
fd = QFileDialog(self, "select a file", self.LE_ParamsFile.text(), "dat Files (*.dat);;All Files (*)")
if fd.exec_():
infile = fd.selectedFiles()[0]
self.LE_ParamsFile.setText(infile)
- self.paramsFile=str(infile).encode("latin-1")
+ self.paramsFile=str(infile)
def meshFileNameChanged(self):
self.fichierIn=str(self.LE_MeshFile.text())
except:
pass
- style = str(self.style).encode("latin-1")
+ style = str(self.style)
# Translation of old Yams options to new MG-SurfOpt options
if style == "0" :
self.commande+= " --optimisation only"