diff --git a/externalProgramPathGui.pyw b/externalProgramPathGui.pyw index ef95028387aa14c786b9a63f98563e456b94e3dd..8c5f8054473540efa2c8e834304f21aaa4aaa8d8 100755 --- a/externalProgramPathGui.pyw +++ b/externalProgramPathGui.pyw @@ -4,6 +4,7 @@ # Gui to configure externals program path according to local configuration ## Qt ## +from __future__ import print_function foundQt=0 try: from PyQt4.QtCore import * @@ -137,20 +138,20 @@ class ExtProgsConfGui(QWidget): def updateWidgetsValues(self): self.extProgPath.applyDependencies() if self.extProgPath.debug : - print "updateWidgetsValues" + print("updateWidgetsValues") for var in self.sf: self.sf[var].setParamValue() def updateWidgetsVisibility(self): if self.extProgPath.debug : - print "updateWidgetsVisibility" + print("updateWidgetsVisibility") # update enabled/disabled of options self.extProgPath.configActions() for var in self.sf: self.sf[var].setEnabled(self.extProgPath.pars[var].enabled) def updateWidgetsValues(self): if self.extProgPath.debug : - print "updateWidgetsVisibility" + print("updateWidgetsVisibility") # update enabled/disabled of options self.extProgPath.configActions() for var in self.sf: @@ -158,17 +159,17 @@ class ExtProgsConfGui(QWidget): def userSave(self): if self.extProgPath.debug : - print "Save pressed" + print("Save pressed") self.extProgPath.savePars() def progSave(self): if self.extProgPath.debug : - print "Save pressed" + print("Save pressed") self.extProgPath.savePars('.') def quit(self): if self.extProgPath.debug : - print "Quit pressed" + print("Quit pressed") sys.exit() diff --git a/launchGui.pyw b/launchGui.pyw index c9e7a289bbc8c84d768e4c2783fcd04315836f25..936fa7c2f29dbe7c6e8dc2d83311cb215aec57b7 100755 --- a/launchGui.pyw +++ b/launchGui.pyw @@ -11,6 +11,9 @@ # unicodestr.encode('ascii','ignore') # +from __future__ import print_function +from builtins import map +from builtins import str import os,sys from prmClassesGui import * from launch import * @@ -239,7 +242,7 @@ class LaunchGui(QWidget): # ---------------------------------------------------------------------------------- def go(self): - print "Go pressed" + print("Go pressed") # disable the gui modifications during run self.guiEnable(False) @@ -274,7 +277,7 @@ class LaunchGui(QWidget): # launch.go() ... self.launch.go() - except Exception, e: + except Exception as e: #print e QMessageBox.information(self, 'Error', str(e)) @@ -282,9 +285,9 @@ class LaunchGui(QWidget): self.guiEnable(True) def interrupt(self): - print "interrupt pressed" + print("interrupt pressed") self.process.kill() - print "interrupt done" + print("interrupt done") # Boucle d'execution du Qprocess avec recuperation des events def waitQProcessForFinish(self): @@ -300,25 +303,25 @@ class LaunchGui(QWidget): return retcode def save(self): - print "Save pressed" + print("Save pressed") self.baseDir.savePars() #self.launch.printPars() self.launch.savePars() def quit(self): - print "Quit pressed" + print("Quit pressed") sys.exit() def updateWidgetsValues(self): self.launch.applyDependencies() if self.launch.debug : - print "updateWidgetsValues" + print("updateWidgetsValues") for var in self.sf: self.sf[var].setParamValue() def updateWidgetsVisibility(self): if self.launch.debug : - print "updateWidgetsVisibility" + print("updateWidgetsVisibility") # update enabled/disabled of options self.launch.configActions() for var in self.sf: @@ -367,7 +370,7 @@ class LaunchGui(QWidget): def write(self, stuff): if '\n' in stuff: - map( self.writeLine, stuff.split("\n") ) + list(map( self.writeLine, stuff.split("\n") )) else: self.buf += stuff self.app.processEvents() @@ -386,14 +389,14 @@ def main(): #define launcher launch = LaunchJob() if launch.debug : - print "launch defined" + print("launch defined") # create gui launchGui = LaunchGui(launch) # opening Gui launchGui.show() # signal pour cloturer proprement l'application PyQt quand on ferme la fenetre launchGui.app.lastWindowClosed.connect(launchGui.app.quit) - print "ready." + print("ready.") sys.exit(launchGui.app.exec_()) if __name__=="__main__": diff --git a/postProLoopGui.pyw b/postProLoopGui.pyw index 84bbc9af3e0030a4418bdf55f6ad2a4faa33db50..9dd2609deab122cc94e88975c930f2f9a0e3180e 100755 --- a/postProLoopGui.pyw +++ b/postProLoopGui.pyw @@ -7,6 +7,7 @@ # ## Qt ## +from __future__ import print_function foundQt=0 try: from PyQt4.QtCore import * @@ -176,13 +177,13 @@ class PostProLoopGui(QWidget): def updateWidgetsValues(self): self.postProLoop.applyDependencies() if self.postProLoop.debug: - print "updateWidgetsValues" + print("updateWidgetsValues") for var in self.sf: self.sf[var].setParamValue() def updateWidgetsVisibility(self): if self.postProLoop.debug: - print "updateWidgetsVisibility" + print("updateWidgetsVisibility") # update enabled/disabled of options self.postProLoop.configActions() for var in self.sf: @@ -190,7 +191,7 @@ class PostProLoopGui(QWidget): def updateWidgetsValues(self): if self.postProLoop.debug: - print "updateWidgetsVisibility" + print("updateWidgetsVisibility") # update enabled/disabled of options self.postProLoop.configActions() for var in self.sf: @@ -198,17 +199,17 @@ class PostProLoopGui(QWidget): def go(self): if self.postProLoop.debug: - print "Go pressed" + print("Go pressed") self.postProLoop.go() def save(self): if self.postProLoop.debug: - print "Save pressed" + print("Save pressed") self.postProLoop.savePars('.') def quit(self): if self.postProLoop.debug: - print "Quit pressed" + print("Quit pressed") sys.exit() # ============== Main ========================