Re: using optparser

2010-10-16 Thread Michele Simionato
Accepting both options and positional arguments for the same purpose does not look like a good idea to me. Anyway, here is a solution using plac (http://pypi.python.org/pypi/ plac) assuming you can afford an external dependency: import plac @plac.annotations( personname=("person to be matched

Re: using optparser

2010-10-16 Thread Jonathan Gardner
On Oct 16, 7:59 pm, jimgardener wrote: > hi > I have a program which I call  findmatch that expects these arguments > 1.a person name > 2.a group name > 3.an integer > 4.a float value > > I thought I would allow user to call this program either using options > or using positional arguments in a pr

Re: using optparser

2010-10-16 Thread Chris Hulan
On Oct 16, 10:59 pm, jimgardener wrote: > hi > I have a program which I call  findmatch that expects these arguments > 1.a person name > 2.a group name > 3.an integer > 4.a float value > > I thought I would allow user to call this program either using options > or using positional arguments in a p