Re: argparse ConfigureAction problem

2012-03-26 Thread Jason Friedman
> ./plot_stuff2.py --plot stuff1 stuff2 > [...] > plot_stuff2.py: 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 --

argparse ConfigureAction problem

2012-03-24 Thread Neal Becker
I've been using arparse with ConfigureAction (which is shown below). But, it doesn't play well with positional arguments. For example: ./plot_stuff2.py --plot stuff1 stuff2 [...] plot_stuff2.py: error: argument --plot/--with-plot/--enable-plot/--no-plot/-- without-plot/--disable-plot: invalid b