I recently found this package (docopt), but i cant seem to get it to work properly. Any help what so ever is appreciated.
The code:
"""docopt_demo.
Usage:
docopt_demo <name>...
docopt_demo --version
"""
from docopt import docopt
arguments = docopt(__doc__) # <---- $0
print("WTF!") # <---- $1
The output:
Usage:
docopt_demo <name>...
docopt_demo --version
[Finished in 0.052s]
Why?
- Why doesn't
$1
print? - Why does
$0
print? - If
$0
is supposed to run last, how do i access the values from$0
?