From e2f674d199cc3f40b5e680efa853e46ccc64abbe Mon Sep 17 00:00:00 2001 From: Luc Papeleux <L.Papeleux@ULiege.be> Date: Thu, 25 Jun 2020 10:41:32 +0200 Subject: [PATCH] py3 port launch.py --- launch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launch.py b/launch.py index d870c3a..2a7641d 100755 --- a/launch.py +++ b/launch.py @@ -339,14 +339,14 @@ class LaunchJob(ParametricJob): # filling command to battery pin.write('import sys, os, os.path\n') if self.debug: - pin.write('print "sys.path = ", sys.path\n') - pin.write('print "os.getcwd() = ", os.getcwd()\n') + pin.write('print ("sys.path = ", sys.path\n)') + pin.write('print ("os.getcwd() = ", os.getcwd()\n)') #pin.write("raw_input()\n") pin.write('if os.path.isdir(r"%s"):\n'%mtfdir) pin.write('\tsys.path.append(r"%s")\n'%mtfdir) # mtfdir est dorenavant un abspath #pin.write('\tsys.path.append(os.path.abspath(r"%s"))\n'%mtfdir) pin.write('else:\n') - pin.write('\tprint "metafor dir %s not found!"\n'%mtfdir) + pin.write('\tprint ("metafor dir %s not found!"\n)'%mtfdir) pin.write('\tsys.exit()\n\n') pin.write('execfile(r"%s")\n'%os.path.join(mtfdir,'.pythonrc.py')) pin.write('import toolbox.battery as b\n') @@ -382,7 +382,7 @@ class LaunchJob(ParametricJob): if self.pars['AFFINITY'].val != '': pin.write('battery.setAffinity("%s")\n'%self.pars['AFFINITY'].val) if self.pars['NICE_VALUE'].val != '0': - #print 'battery.setNice(%s)\n'%self.pars['NICE_VALUE'].val + #print ('battery.setNice(%s)\n'%self.pars['NICE_VALUE'].val) pin.write('battery.setNice(%s)\n'%self.pars['NICE_VALUE'].val) pin.write('battery.setNumTasks(%s)\n'%self.pars['NB_TASKS'].val) @@ -401,7 +401,7 @@ class LaunchJob(ParametricJob): # wait for process to finish if self.launchGui: retcode = self.launchGui.waitQProcessForFinish() - #print "Qprocess finished with retcode: ",retcode + #print ("Qprocess finished with retcode: ",retcode) else: #close pin flux pin.close() -- GitLab