Debian Codegraph @

examples/options_example.py

raw
1 """Example of program with many options using docopt.
2
3 Usage:
4 options_example.py [-hvqrf NAME] [--exclude=PATTERNS]
5 [--select=ERRORS | --ignore=ERRORS] [--show-source]
6 [--statistics] [--count] [--benchmark] PATH...
7 options_example.py (--doctest | --testsuite=DIR)
8 options_example.py --version
9
10 Arguments:
11 PATH destination path
12
13 Options:
14 -h --help show this help message and exit
15 --version show version and exit
16 -v --verbose print status messages
17 -q --quiet report only file names
18 -r --repeat show all occurrences of the same error
19 --exclude=PATTERNS exclude files or directories which match these comma
20 separated patterns [default: .svn,CVS,.bzr,.hg,.git]
21 -f NAME --file=NAME when parsing directories, only check filenames matching
22 these comma separated patterns [default: *.py]
23 --select=ERRORS select errors and warnings (e.g. E,W6)
24 --ignore=ERRORS skip errors and warnings (e.g. E4,W)
25 --show-source show source code for each error
26 --statistics count errors and warnings
27 --count print total number of errors and warnings to standard
28 error and set exit code to 1 if total is not null
29 --benchmark measure processing speed
30 --testsuite=DIR run regression tests from dir
31 --doctest run doctest on myself
32
33 """
34 from docopt import docopt
35
36
37 if __name__ == '__main__':
38 arguments = docopt(__doc__, version='1.0.0rc2')
39 print(arguments)