Optparse and varible nargs

John Goebel jgoebel987 at yahoo.com
Mon Nov 3 20:10:36 CET 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?


More information about the Python-list mailing list