Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
Flexpart
Flex Extract
Commits
c00f2d52
Commit
c00f2d52
authored
3 years ago
by
Katharina Baier
Browse files
Options
Downloads
Patches
Plain Diff
Update clear_ectrans_list_v2.py
parent
2f7df43a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clear_ectrans_list_v2.py
+23
-0
23 additions, 0 deletions
clear_ectrans_list_v2.py
with
23 additions
and
0 deletions
clear_ectrans_list_v2.py
+
23
−
0
View file @
c00f2d52
"""
run on ECMWF-Server: python clear_ectrans_list_v2.py
package requirements: subprocess (pip install subprocess)
original author: A. Plach, updated by K. Baier
"""
from
subprocess
import
check_output
#, run
import
subprocess
# write output of ecaccess-ectrans-list to a variable, but transfer it
# to a string (from bytes format) and split at newline
out
=
str
(
check_output
([
'
ecaccess-ectrans-list
'
])).
split
(
'
\n
'
)
for
i
,
line
in
enumerate
(
out
):
line_tmp
=
line
.
split
()
procID
=
line_tmp
[
0
]
try
:
subprocess
.
check_call
([
'
ecaccess-ectrans-delete
'
,
str
(
procID
)])
print
(
str
(
procID
))
except
TypeError
as
e
:
print
(
e
)
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