Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
f52ba225
Commit
f52ba225
authored
11 years ago
by
Francois Henrotte
Browse files
Options
Downloads
Patches
Plain Diff
Tools for managing archived solutions files in python metamodels
parent
f7fff91d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/onelab/python/onelab.py
+29
-1
29 additions, 1 deletion
contrib/onelab/python/onelab.py
with
29 additions
and
1 deletion
contrib/onelab/python/onelab.py
+
29
−
1
View file @
f52ba225
...
...
@@ -250,6 +250,16 @@ class client :
self
.
_getParameter
(
param
,
warn_if_not_found
)
return
param
.
value
def
getNumberChoices
(
self
,
name
,
warn_if_not_found
=
True
):
param
=
_parameter
(
'
number
'
,
name
=
name
)
self
.
_getParameter
(
param
,
warn_if_not_found
)
return
param
.
choices
def
getStringChoices
(
self
,
name
,
warn_if_not_found
=
True
):
param
=
_parameter
(
'
string
'
,
name
=
name
)
self
.
_getParameter
(
param
,
warn_if_not_found
)
return
param
.
choices
def
show
(
self
,
name
)
:
if
not
self
.
socket
:
return
...
...
@@ -398,7 +408,7 @@ class client :
print
(
line
.
rstrip
())
result
=
call
.
wait
()
if
result
==
0
:
self
.
_send
(
self
.
_GMSH_INFO
,
'
call
\"
'
+
''
.
join
(
argv
)
+
'
\"
'
)
self
.
_send
(
self
.
_GMSH_INFO
,
'
call
\"
'
+
'
'
.
join
(
argv
)
+
'
\"
'
)
else
:
self
.
_send
(
self
.
_GMSH_ERROR
,
'
call failed !!
\n
'
+
call
.
stderr
.
read
().
encode
(
'
utf-8
'
))
...
...
@@ -434,3 +444,21 @@ class client :
print
(
call
.
stderr
.
read
())
##self._send(self._GMSH_ERROR, 'download failed !!\n' + call.stderr.read().encode('utf-8'))
def
solutionFiles
(
self
,
list
)
:
self
.
defineNumber
(
'
0Metamodel/9Use restored solution
'
,
value
=
0
,
choices
=
[
0
,
1
])
self
.
defineString
(
'
0Metamodel/9Tag
'
,
value
=
''
)
if
list
:
if
self
.
getNumber
(
'
0Metamodel/9Use restored solution
'
)
:
return
self
.
getStringChoices
(
'
0Metamodel/9Solution files
'
)
else
:
self
.
setString
(
'
0Metamodel/9Solution files
'
,
value
=
list
[
0
],
choices
=
list
,
readOnly
=
1
)
return
list
def
restoreSolution
(
self
)
:
return
self
.
getNumber
(
'
0Metamodel/9Use restored solution
'
)
def
outputFiles
(
self
,
list
)
:
if
list
:
self
.
setString
(
self
.
name
+
'
/9Output files
'
,
value
=
list
[
0
],
choices
=
list
,
visible
=
0
)
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