optparse and negative numbers as positional arguments

Grant Edwards grante at visi.com
Tue Apr 5 17:27:41 EDT 2005


On 2005-04-05, Tomi Silander <tsilande at hiit.fi> wrote:

> this must have been asked 1000 times (or nobody is as stupid as me),
> but since I could not find the answer, here is the question.

[...]

> $ python2.4 ./mitvit.py -1.1

[optparse error]

> How is one supposed to give negative numbers as positional arguments 
> when using optparse?

  ./mitvit.py -- -1.1

-- 
Grant Edwards                   grante             Yow!  .. over in west
                                  at               Philadelphia a puppy is
                               visi.com            vomiting...



More information about the Python-list mailing list