Skip to content

Commit

Permalink
Merge pull request #7 from NCAR-CISL-ASAP/modglob
Browse files Browse the repository at this point in the history
Allowing wildcards in command-line arguments
  • Loading branch information
Kevin Paul committed Sep 21, 2015
2 parents 0b0fc6e + 3a3db0e commit 55e1fb0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/slice2series
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See the LICENSE.rst file for details
"""

import optparse
import glob
from pyreshaper import specification
from pyreshaper import reshaper

Expand Down Expand Up @@ -79,8 +80,13 @@ def main(options, input_file_list):
# Create the input object for the Reshaper
spec = specification.create_specifier()

# Generate the input file list from (potentially) globs/wildcards
full_input_file_list = []
for arg in input_file_list:
full_input_file_list.extend(glob.glob(arg))

# Add input to the specifier
spec.input_file_list = input_file_list
spec.input_file_list = full_input_file_list
spec.netcdf_format = options.netcdf_format
spec.output_file_prefix = options.output_prefix
spec.output_file_suffix = options.output_suffix
Expand Down

0 comments on commit 55e1fb0

Please sign in to comment.