f.write(cmds)
self.make_executable(nomFichier)
- if verbose: print("INFO: MGCleaner launch script file: %s" % nomFichier)
+ if verbose: print(("INFO: MGCleaner launch script file: %s" % nomFichier))
self.monExe.start(nomFichier)
self.monExe.closeWriteChannel()
savedir=os.environ['HOME']
fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir)
if fn.isNull() : return
- ulfile = os.path.abspath(unicode(fn))
+ ulfile = os.path.abspath(str(fn))
try:
f = open(fn, 'wb')
f.write(str(self.TB_Exe.toPlainText()))
f.close()
- except IOError, why:
+ 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(unicode(fn)).arg(str(why)))
+ .arg(str(fn)).arg(str(why)))
def readFromStdErr(self):
a=self.monExe.readAllStandardError()
- self.TB_Exe.append(unicode(a.data()))
+ self.TB_Exe.append(str(a.data()))
def readFromStdOut(self) :
a=self.monExe.readAllStandardOutput()
- aa=unicode(a.data())
+ aa=str(a.data())
self.TB_Exe.append(aa)
def finished(self):