I need to get an unknown number of file names from the command line, ie
./python MyScript.py --Files 1.txt 2.txt 3.txt
parser.add_option("-n", "--NumFiles", type="int",
help="Number of files")
parser.add_option("--Files", nargs=options.NumFiles,
help="a triple")
(options, args) = parser.parse_args()
Clearly this will not work because options.NumFiles is not available until after parse_args() is called. Is there a way to do this?
Thanks,
Dave