diff options
author | kotfu <kotfu@kotfu.net> | 2019-11-29 17:05:37 -0700 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2019-11-29 17:05:37 -0700 |
commit | de9e778481069b6d23d5b8ed639b328172633552 (patch) | |
tree | c25aa550f92f8606033a7d13b1a060e6c568545c /cmd2 | |
parent | 51851b8aa0d685b039a066a3b8efe88aa05b6113 (diff) | |
download | cmd2-git-de9e778481069b6d23d5b8ed639b328172633552.tar.gz |
Show various attribute documentation approaches for #821
Diffstat (limited to 'cmd2')
-rw-r--r-- | cmd2/cmd2.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 2ed87fdc..9174a3f4 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -133,6 +133,9 @@ class Cmd(cmd.Cmd): " This command is for internal use and is not intended to be called from the\n" " command line.") + debug = False + """Set to True to display a full stack trace when exceptions occur""" + # Sorting keys for strings ALPHABETICAL_SORT_KEY = utils.norm_fold NATURAL_SORT_KEY = utils.natural_keys @@ -417,9 +420,13 @@ class Cmd(cmd.Cmd): def broken_pipe_warning(self) -> str: """Message to display if a BrokenPipeError is raised while writing output. - :meth:`~cmd2.cmd2.Cmd.poutput()` catches BrokenPipeError exceptions and - outputs the contents of `broken_pipe_warning`. The default value is an - empty string meaning the BrokenPipeError is silently swallowed. + The following methods catch BrokenPipeError exceptions and output this message: + + - :meth:`~cmd2.cmd2.Cmd.poutput()` + - :meth:`~cmd2.cmd2.Cmd.ppaged()` + + The default value is an empty string meaning the BrokenPipeError is + silently swallowed. """ return self.broken_pipe_error |