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
Small example:
➤ cat example.py """Example Usage: example.py [options] <name>... Options: -s=<kn>, --speed=<kn> Speed in km. """ from docopt import docopt args = docopt(__doc__) print(args)
Using long option:
➤ python3.5 example.py --speed=25 name {'--speed': '25', '<name>': ['name']}
Using short option:
➤ python3.5 example.py -s=25 name {'--speed': '=25', '<name>': ['name']}
Note that --speed value starts from an unneeded equal sign.
--speed
The text was updated successfully, but these errors were encountered:
short option can stick value together, but no = needed.
=
python3.5 example.py -s25 name
equals
python3.5 example.py -s 25 name
python3.5 example.py --speed=25 name
python3.5 example.py --speed 25 name
Sorry, something went wrong.
But why is specifying -s=<kn> even accepted in the docstring?
-s=<kn>
Isn't the specification in the docstring invalid, and docopt should tell us?
No branches or pull requests
Small example:
Using long option:
Using short option:
Note that
--speed
value starts from an unneeded equal sign.The text was updated successfully, but these errors were encountered: