Passing all extra commandline arguments to python program, Optparse raises exception

Saptarshi saptarshi.guha at
Fri Apr 17 02:32:36 CEST 2009

> > Saptarshi
> Preprocess the sys.args before calling optparse.
> Simply search sys.args for the string "start" and the string "stop", and
> note whichever comes first.  Then use slice operators to peel the extra
> arguments off of sys.args.

Thanks, i implemented your logic. I thought there was a Optparse
feature to handle this.

More information about the Python-list mailing list