Skip to content
Snippets Groups Projects
Commit e2f674d1 authored by Papeleux Luc's avatar Papeleux Luc
Browse files

py3 port launch.py

parent 6a2ac91a
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment