Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
e2f674d1
Commit
e2f674d1
authored
4 years ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
py3 port launch.py
parent
6a2ac91a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
launch.py
+5
-5
5 additions, 5 deletions
launch.py
with
5 additions
and
5 deletions
launch.py
+
5
−
5
View file @
e2f674d1
...
...
@@ -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
(
'
\t
sys.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
(
'
\t
print
"
metafor dir %s not found!
"
\n
'
%
mtfdir
)
pin
.
write
(
'
\t
print
(
"
metafor dir %s not found!
"
\n
)
'
%
mtfdir
)
pin
.
write
(
'
\t
sys.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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment