Greetings,
A script is working on one or more files. I want to pass the filenames (with regex in them) as arguments and put them in a list. What is the best way to do it?
For example I would accept the following arguments:
script.py file[1-3].nc #would create list [file1.nc, file2.nc, file3.nc] that I can work on
script.py file*.nc #would scan the folder for matching patterns and create a list
script.py file1.nc file15.nc booba[1-2].nc #creates [file1.nc, file15.nc, booba1.nc, booba2.nc]