| 1 |
"""Example of program which uses [options] shortcut in pattern. |
| 2 |
|
| 3 |
Usage: |
| 4 |
options_shortcut_example.py [options] <port> |
| 5 |
|
| 6 |
Options: |
| 7 |
-h --help show this help message and exit |
| 8 |
--version show version and exit |
| 9 |
-n, --number N use N as a number |
| 10 |
-t, --timeout TIMEOUT set timeout TIMEOUT seconds |
| 11 |
--apply apply changes to database |
| 12 |
-q operate in quiet mode |
| 13 |
|
| 14 |
""" |
| 15 |
from docopt import docopt |
| 16 |
|
| 17 |
|
| 18 |
if __name__ == '__main__': |
| 19 |
arguments = docopt(__doc__, version='1.0.0rc2') |
| 20 |
print(arguments) |