diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..9ec21be --- /dev/null +++ b/demo.py @@ -0,0 +1,18 @@ +# author: Tiffany Timbersy +# date: 2020-01-15 + +"""This script prints out docopt args. +Usage: demo.py --arg2= [--arg3=] [--arg4=] + +Options: + Takes any value (this is a required positional argument) +--arg2= Takes any value (this is a required option) +[--arg3=] Takes any value (this is an optional option) +[--arg4=] Takes any value (this is an optional option) +""" + +from docopt import docopt +opt = docopt(__doc__) +print(opt["--arg4"]) +print(opt) +print(type(opt))