diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-03-07 19:57:28 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-03-07 19:57:28 -0500 |
commit | d731cff17b5ef78431ca2e8453b35b9fc05a5dbe (patch) | |
tree | 5dfab206391b0cb36e4e459c601099a8b56c97df /docs | |
parent | 5cc434b0150e38252bc6eaba91825805db08e5a4 (diff) | |
download | cmd2-git-d731cff17b5ef78431ca2e8453b35b9fc05a5dbe.tar.gz |
Refactored the Windows vs macOS/Linux conditional in ppaged()
Aslo:
- Added some documentation for ppaged()
- Updated CHANGELOG
- Added line about ppaged() in README
Diffstat (limited to 'docs')
-rw-r--r-- | docs/unfreefeatures.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/unfreefeatures.rst b/docs/unfreefeatures.rst index e92bf2d6..2d6c8c3c 100644 --- a/docs/unfreefeatures.rst +++ b/docs/unfreefeatures.rst @@ -147,21 +147,23 @@ There are a couple functions which can globally effect how arguments are parsed .. _argparse: https://docs.python.org/3/library/argparse.html -poutput, pfeedback, perror -========================== +poutput, pfeedback, perror, ppaged +================================== Standard ``cmd`` applications produce their output with ``self.stdout.write('output')`` (or with ``print``, but ``print`` decreases output flexibility). ``cmd2`` applications can use -``self.poutput('output')``, ``self.pfeedback('message')``, and ``self.perror('errmsg')`` +``self.poutput('output')``, ``self.pfeedback('message')``, ``self.perror('errmsg')``, and ``self.ppaged('text')`` instead. These methods have these advantages: - Handle output redirection to file and/or pipe appropriately - More concise - ``.pfeedback()`` destination is controlled by :ref:`quiet` parameter. +- Option to display long output using a pager via ``ppaged()`` .. automethod:: cmd2.Cmd.poutput .. automethod:: cmd2.Cmd.perror .. automethod:: cmd2.Cmd.pfeedback +.. automethod:: cmd2.Cmd.ppaged color |