I use docopt
for some time now and on a new script I cannot manage to pass through the argument parsing:
# coding=utf-8
"""
API server for the infoscreen frontends
Usage:
python3 webserver.py [options]
Options:
--bind ADDRESS address to bind to [default: 0.0.0.0]
--galarmclock URL URL for the galarmclock API [default: http://10.100.10.202:8082]
--loglevel LOG logging level [default: logging.DEBUG]
--console log to console [default: False]
--syslog log to syslog [default: False]
"""
import docopt
# process arguments
args = docopt.docopt(__doc__)
print(args)
All paramters (arguments) are optional and have a default so why does the script stops?
C:\Python3\python.exe C:/tst.py
Usage:
python3 webserver.py [options]
Process finished with exit code 1