diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-22 00:08:27 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-22 00:08:27 -0500 |
commit | f28c10a50535f753419bd2120ac6cb0bea9f56e2 (patch) | |
tree | 102b200c4a3dff1adad4bf326ea3f6de9cd56baf /tests/script.py | |
parent | c9f7c012bda012b4df7a8c5e853bd5d3e6d99b1b (diff) | |
download | cmd2-git-f28c10a50535f753419bd2120ac6cb0bea9f56e2.tar.gz |
help command temporarily redirects sys.stdout and sys.stderr to self.stdout for argparse commands
In order to make "help" behave more consistently for decorated and undecorated commands, argparse output is temporarily redirected to self.stdout. So doing "help history" is similar to "help load".
However, when using the "-h" with argparse commands without using the "help" command, the output from argparse isn't redirected to self.stdout. Fixing this would be rather difficult and would essentially involve creating a pyparsing rule to detect it at the parser level.
Diffstat (limited to 'tests/script.py')
0 files changed, 0 insertions, 0 deletions