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

Saptarshi saptarshi.guha at gmail.com
Thu Apr 16 20:32:36 EDT 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