私docopt
はしばらくの間、引数の解析を通過することができない新しいスクリプトを使用しています。
# 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)
すべてのパラメーター (引数) はオプションであり、既定値があるのに、スクリプトが停止するのはなぜですか?
C:\Python3\python.exe C:/tst.py
Usage:
python3 webserver.py [options]
Process finished with exit code 1