diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..7a49e76 --- /dev/null +++ b/demo.py @@ -0,0 +1,23 @@ +# author: Tiffany Timbers +# date: 2020-01-15 + +"""This script prints out docopt args. +Usage: docopt.py --arg2= [--arg3=] [] + +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) +[] Takes any value (this is an optional positional argument) +""" + +from docopt import docopt +opt = docopt(__doc__) + +def main(opt, arg4): + print(opt) + print(type(opt)) + print(f'The value of arg4 is {arg4} and the type of arg4 is {type(arg4)}') + +if __name__ == "__main__": + main(opt, opt[""]) \ No newline at end of file