Optparse and varible nargs

John Goebel jgoebel987 at yahoo.com
Mon Nov 3 14:10:36 EST 2003


I have a program that I want to pass a variable number of things too. 

foo_prog -f one two three 

optparse has the nargs feature, but it is determinant; you have to know
how many variables are going to be passed.

Is there a suggestion on how to use optparse with something like:

nargs = >1?

Thanks,
John




More information about the Python-list mailing list