Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PyFVCOM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FVCOM
PyFVCOM
Commits
2354792f
Commit
2354792f
authored
Jan 15, 2018
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add verbose output option to the multi-file FileReader function.
parent
c65f0bcc
Pipeline
#775
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
PyFVCOM/read.py
PyFVCOM/read.py
+7
-1
No files found.
PyFVCOM/read.py
View file @
2354792f
...
...
@@ -774,13 +774,15 @@ class FileReader(Domain):
return
time_idx
def
MFileReader
(
fvcom
,
*
args
,
**
kwargs
):
def
MFileReader
(
fvcom
,
noisy
=
False
,
*
args
,
**
kwargs
):
""" Wrapper around FileReader for loading multiple files at once.
Parameters
----------
fvcom : list-like, str
List of files to load.
noisy : bool, optional
Set to True to write out the name of each file being loaded.
Additional arguments are passed to `PyFVCOM.read.FileReader'.
...
...
@@ -792,9 +794,13 @@ def MFileReader(fvcom, *args, **kwargs):
"""
if
isinstance
(
fvcom
,
str
):
if
noisy
:
print
(
'Loading {}'
.
format
(
fvcom
))
FVCOM
=
FileReader
(
fvcom
,
*
args
,
**
kwargs
)
else
:
for
file
in
fvcom
:
if
noisy
:
print
(
'Loading {}'
.
format
(
file
))
if
file
==
fvcom
[
0
]:
FVCOM
=
FileReader
(
file
,
*
args
,
**
kwargs
)
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment