On Sep 27, 1:34 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
...
> >>> args
>
> ['-123']
>
> Without the "--" arg you will get an error:
>
> >>> parser.parse_args(["-123"])
>
> Usage:  [options]
>
> : error: no such option: -1
> $
>
> Peter

Passing -a-123 works
>>> options, args = parser.parse_args(["-a-123"])
>>> options.a
-123

-N

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to