When followint the docopt README, I would expect the following file to produce some valid output:
#!/usr/bin/env python
"""Example file.
Usage:
test_docopt.py test
test_docopt.py (-h | --help)
test_docopt.py --version
Options:
-h --help Show this screen
--version Show version.
"""
import pkg_resources
pkg_resources.require("docopt==0.6.1")
from docopt import docopt
if __name__ == '__main__':
args = docopt(__doc__, version="Extend limb profiles 0.1")
print(args)
However, when I call test_docopt.py, I only get a meaningless/empty Usage statement:
$ python test_docopt.py test
Usage:
My two questions are:
- Why is docopt apparently failing to recognize the test command?
- Why isn't the Usage pattern filled with the actual usage pattern?