Peter Otten <__pete...@web.de> writes:
> I'm not sure about this one; one purpose of REMAINDER is to pass on the
> unprocessed arguments to another program/script, and this might follow the
> same convention. Should
>
> parser.add_argument('-v', '--verbose', action='store_true')
> parser.add_arg
Amit Ramon wrote:
> Peter Otten <__pete...@web.de> [2015-11-06 11:57 +0100]:
>
>
>>>
>>> For example, with the above code
>>>
>>> my_prog -v hello world
>>>
>>> works well, but
>>>
>>> my_prog -v -x hello world
>>>
>>> Fails with an error message 'error: unrecognized arguments: -x'.
>>
>
Peter Otten <__pete...@web.de> [2015-11-06 11:57 +0100]:
For example, with the above code
my_prog -v hello world
works well, but
my_prog -v -x hello world
Fails with an error message 'error: unrecognized arguments: -x'.
This looks like a bug to me. Please report it on bug.python.
Amit Ramon wrote:
> Hello,
>
> I'm trying to use argparse in a program that gets some options and
> positional arguments. I want to collect all the positional arguments
> in a single argument using the REMAINDER option to add_argument() as
> shown bellow:
>
> parser = argparse.ArgumentParser
Hello,
I'm trying to use argparse in a program that gets some options and
positional arguments. I want to collect all the positional arguments
in a single argument using the REMAINDER option to add_argument() as
shown bellow:
parser = argparse.ArgumentParser(description='Test argparse')
pa