We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With a docstring like this:
Usage: script.py <arg> script.py [<cmd>] <arg>
here's what I get for docopt and argopt:
With python script.py a
python script.py a
docopt: docopt: {'<arg>': 'a','<cmd>': None}
docopt: {'<arg>': 'a','<cmd>': None}
argopt:
usage: script.py [-h] arg arg [cmd] script.py: error: too few arguments
With python script.py run a
python script.py run a
docopt: docopt: {'<arg>': 'a','<cmd>': 'run'}
docopt: {'<arg>': 'a','<cmd>': 'run'}
argopt: Namespace(arg='a', cmd='None').
Namespace(arg='a', cmd='None')
In both cases docopt does what I'd expect?
The text was updated successfully, but these errors were encountered:
In this case you could use
Usage: script.py [<cmd>] <arg>
or
Usage: script.py <arg> [<cmd>]
What would the use case be? It's not the same as #3
Sorry, something went wrong.
No branches or pull requests
With a docstring like this:
here's what I get for docopt and argopt:
With
python script.py a
docopt:
docopt: {'<arg>': 'a','<cmd>': None}
argopt:
With
python script.py run a
docopt:
docopt: {'<arg>': 'a','<cmd>': 'run'}
argopt:
Namespace(arg='a', cmd='None')
.In both cases docopt does what I'd expect?
The text was updated successfully, but these errors were encountered: