summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-10-19 12:34:11 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-10-19 14:37:45 -0400
commitf4958c5bb081b0ea4b7aeb98fd1d996add1fc47d (patch)
tree3045ac805edb060dcb2951e4a7a6e0d05c17e5fc /cmd2/cmd2.py
parentf57b08672af97f9d973148b6c30d74fe4e712d14 (diff)
downloadcmd2-git-colored_tables.tar.gz
Added ability to colorize all aspects of BorderedTables and AlternatingTables.colored_tables
Refactored utils.align_text() to print less fill_char style characters.
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index b647c48a..c06b9617 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1062,7 +1062,7 @@ class Cmd(cmd.Cmd):
been piped to another process and that process terminates before the
cmd2 command is finished executing.
- :param msg: message to print (anything convertible to a str)
+ :param msg: object to print
:param end: string appended after the end of the message, default a newline
"""
try:
@@ -1080,7 +1080,7 @@ class Cmd(cmd.Cmd):
def perror(self, msg: Any = '', *, end: str = '\n', apply_style: bool = True) -> None:
"""Print message to sys.stderr
- :param msg: message to print (anything convertible to a str)
+ :param msg: object to print
:param end: string appended after the end of the message, default a newline
:param apply_style: If True, then ansi.style_error will be applied to the message text. Set to False in cases
where the message text already has the desired style. Defaults to True.
@@ -1094,7 +1094,7 @@ class Cmd(cmd.Cmd):
def pwarning(self, msg: Any = '', *, end: str = '\n', apply_style: bool = True) -> None:
"""Wraps perror, but applies ansi.style_warning by default
- :param msg: message to print (anything convertible to a str)
+ :param msg: object to print
:param end: string appended after the end of the message, default a newline
:param apply_style: If True, then ansi.style_warning will be applied to the message text. Set to False in cases
where the message text already has the desired style. Defaults to True.
@@ -1134,7 +1134,7 @@ class Cmd(cmd.Cmd):
"""For printing nonessential feedback. Can be silenced with `quiet`.
Inclusion in redirected output is controlled by `feedback_to_output`.
- :param msg: message to print (anything convertible to a str)
+ :param msg: object to print
:param end: string appended after the end of the message, default a newline
"""
if not self.quiet:
@@ -1149,7 +1149,7 @@ class Cmd(cmd.Cmd):
Never uses a pager inside of a script (Python or text) or when output is being redirected or piped or when
stdout or stdin are not a fully functional terminal.
- :param msg: message to print to current stdout (anything convertible to a str)
+ :param msg: object to print
:param end: string appended after the end of the message, default a newline
:param chop: True -> causes lines longer than the screen width to be chopped (truncated) rather than wrapped
- truncated text is still accessible by scrolling with the right & left arrow keys