Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More fixes in Cleaner and SurfOpt:
[modules/smesh.git]
/
src
/
Tools
/
YamsPlug
/
monViewText.py
diff --git
a/src/Tools/YamsPlug/monViewText.py
b/src/Tools/YamsPlug/monViewText.py
index 3109bfe8aad4c8ac3de005f910636ea4d3712bfb..9d92a0c55a7eac476d31cc47d38bc3f10d865d62 100644
(file)
--- a/
src/Tools/YamsPlug/monViewText.py
+++ b/
src/Tools/YamsPlug/monViewText.py
@@
-94,24
+94,25
@@
class MonViewText(Ui_ViewExe, QDialog):
def saveFile(self):
#recuperation du nom du fichier
savedir=os.environ['HOME']
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')
ulfile = os.path.abspath(str(fn))
try:
f = open(fn, 'wb')
- f.write(s
tr(self.TB_Exe.toPlainText()
))
+ f.write(s
elf.TB_Exe.toPlainText().encode("utf-8"
))
f.close()
except IOError as why:
QMessageBox.critical(self, 'Save File',
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()
def readFromStdErr(self):
a=self.monExe.readAllStandardError()
- self.TB_Exe.append(str(a.data().encode()))
+ aa=a.data().decode(errors='ignore')
+ self.TB_Exe.append(aa)
def readFromStdOut(self) :
a=self.monExe.readAllStandardOutput()
def readFromStdOut(self) :
a=self.monExe.readAllStandardOutput()
- aa=
str(a.data()
)
+ aa=
a.data().decode(errors='ignore'
)
self.TB_Exe.append(aa)
def finished(self):
self.TB_Exe.append(aa)
def finished(self):