I am trying to learn how to use docopt.
Below is my file docopt_test.py. Ideally I should get the passed arguments printed after I run this, but I am only getting output that is printing the usage comment.
Can anyone kindly point me to what am I doing incorrect?
Thanks.
$python3 docopt_test.py client task environment working MCE.zip
Usage:
docopt_test.py client task environment [--local_tmp_folder=<td>] [--filenm=<filename>]
docopt_test.py (-h | --help)
docopt_test.py --version
#docopt_test.py
"""
Usage:
docopt_test.py client task environment [--local_tmp_folder=<td>] [--filenm=<filename>]
docopt_test.py (-h | --help)
docopt_test.py --version
Options:
-h --help Show this screen.
--version Show version.
--entity=<entityname> specify entity to load
"""
from docopt import docopt
if __name__ == '__main__':
arguments = docopt(__doc__, argv=None, help=True,
version=None, options_first=True)
print(arguments)