Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1class EXIT:
2 """Constants for standardizing shell exit codes."""
3 OK = 0
4 ERROR = 1
5 INPUT = 2
6 USAGE = 64
7 ENVIRONMENT = 71
8 IO = 74
9 TEMP = 75
10 PERMISSIONS = 77
11 CONFIG = 78
14EXIT_FAILURE = EXIT.ERROR
15"""A shortcut for a shell exit code of "failure"."""
17EXIT_SUCCESS = EXIT.OK
18"""A shortcut for a shell exit code of "success"."""
20EXIT_UNKNOWN = 99
21"""An unknown shell exit code."""
24# noinspection PyPep8Naming
25class OUTPUT_FORMAT:
26 """The output formats supported by `python-tabulate`_.
28 .. _python-tabulate: https://bitbucket.org/astanin/python-tabulate
30 The ``MARKDOWN`` format is the same as ``pipe``.
32 """
33 FANCY_GRID = "fancy_grid"
34 GITUB = "github"
35 GRID = "grid"
36 HTML = "html"
37 JIRA = "jira"
38 LATEX = "latex"
39 LATEX_BOOKTABS = "latex_booktabs"
40 LATEX_RAW = "latex_raw"
41 MARKDOWN = "markdown"
42 MEDIAWIKI = "mediawiki"
43 MOINMOIN = "moinmoin"
44 ORGTBL = "orgtbl"
45 PIPE = "pipe"
46 PLAIN = "plain"
47 PRESTO = "presto"
48 PSQL = "psql"
49 RST = "rst"
50 SIMPLE = "simple"
51 TEXTILE = "textile"
52 YOUTRACK = "youtrack"
55OUTPUT_FORMAT_CHOICES = [
56 OUTPUT_FORMAT.FANCY_GRID,
57 OUTPUT_FORMAT.GITUB,
58 OUTPUT_FORMAT.GRID,
59 OUTPUT_FORMAT.HTML,
60 OUTPUT_FORMAT.JIRA,
61 OUTPUT_FORMAT.LATEX,
62 OUTPUT_FORMAT.LATEX_BOOKTABS,
63 OUTPUT_FORMAT.LATEX_RAW,
64 OUTPUT_FORMAT.MARKDOWN,
65 OUTPUT_FORMAT.MEDIAWIKI,
66 OUTPUT_FORMAT.MOINMOIN,
67 OUTPUT_FORMAT.ORGTBL,
68 OUTPUT_FORMAT.PIPE,
69 OUTPUT_FORMAT.PLAIN,
70 OUTPUT_FORMAT.PRESTO,
71 OUTPUT_FORMAT.PSQL,
72 OUTPUT_FORMAT.RST,
73 OUTPUT_FORMAT.SIMPLE,
74 OUTPUT_FORMAT.TEXTILE,
75 OUTPUT_FORMAT.YOUTRACK,
76]
77"""Command line choices for all supported output formats."""
79OUTPUT_FORMAT_COMMON_CHOICES = [
80 OUTPUT_FORMAT.HTML,
81 OUTPUT_FORMAT.MARKDOWN,
82 OUTPUT_FORMAT.PLAIN,
83 OUTPUT_FORMAT.RST,
84 OUTPUT_FORMAT.SIMPLE,
85]
86"""Command line choices for the most common output formats."""
88DEFAULT_OUTPUT_FORMAT = OUTPUT_FORMAT.PLAIN
89"""The default output format."""