optparse and negative numbers as positional arguments

Tomi Silander tsilande at hiit.fi
Wed Apr 6 10:07:15 EDT 2005


Grant Edwards wrote:

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

>>How is one supposed to give negative numbers as positional arguments 
>>when using optparse?
> 
>   ./mitvit.py -- -1.1

Thank you,
this works. I saw it in the source, but apparently did not properly pay 
attention; all the args after "--" are considered positional if I read 
this right.

ts.



More information about the Python-list mailing list