Skip to content
Snippets Groups Projects
Commit c14b2bfb authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Require files to be an iterator, not a list

Preparing for a check on the first file.
parent ccc4d803
No related branches found
No related tags found
No related merge requests found
......@@ -45,10 +45,10 @@ def process_1_file(bbox, nco_instance, nc_file, cropped_fname, unpacked_fname,
def loop_inst_eddies(files, bbox, d, my_slice):
"""files is a sequence or iterator of file paths. The first file must
exist, others can be missing. bbox is a tuple of four real
numbers. d is a date index (integer value) for the first
date. my_slice is the slice index (integer value) in the SHPC.
"""files is an iterator of file paths. The first file must exist,
others can be missing. bbox is a tuple of four real numbers. d is
a date index (integer value) for the first date. my_slice is the
slice index (integer value) in the SHPC.
"""
......@@ -130,4 +130,4 @@ if __name__ == "__main__":
d = int(d)
my_slice = input("Enter slice index (integer value): ")
my_slice = int(my_slice)
loop_inst_eddies(args.file, args.bbox, d, my_slice)
loop_inst_eddies(iter(args.file), args.bbox, d, my_slice)
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