argparse ConfigureAction problem

Jason Friedman jason at
Tue Mar 27 02:57:51 CEST 2012

> ./ --plot stuff1 stuff2
> [...]
> error: argument --plot/--with-plot/--enable-plot/--no-plot/--
> without-plot/--disable-plot: invalid boolean value: 'stuff1'
> Problem is --plot takes an optional argument, and so the positional arg is
> assumed to be the arg to --plot.  Not sure how to fix this.

Maybe have a look at nargs='*' in

More information about the Python-list mailing list