diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-03-26 13:56:33 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-03-26 15:24:34 -0400 |
commit | 62ed8aebf6eefcf68a15fdd4b7a7cd5dfe4c6f6b (patch) | |
tree | 1e72725041a8e3f83f31dddbfd564fcd02f27401 /README.md | |
parent | 070262e1f397e2297cdb1ad611db6b6d5bed8830 (diff) | |
download | cmd2-git-py_refactor.tar.gz |
Renamed use_ipython keyword parameter of cmd2.Cmd.__init__() to include_ipy.py_refactor
Added include_py keyword parameter to cmd2.Cmd.__init__(). If False, then the py command will not be available.
Removed ability to run Python commands from the command line with py.
Made banners and exit messages of Python and IPython consistent.
Changed utils.is_text_file() to raise OSError if file cannot be read.
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -26,7 +26,8 @@ Main Features - Pipe command output to shell commands with `|` - Redirect command output to file with `>`, `>>` - Bare `>`, `>>` with no filename send output to paste buffer (clipboard) -- `py` enters interactive Python console (opt-in `ipy` for IPython console) +- Optional `py` command runs interactive Python console which can be used to debug your application +- Optional `ipy` command runs interactive IPython console which can be used to debug your application - Option to display long output using a pager with ``cmd2.Cmd.ppaged()`` - Multi-line commands - Special-character command shortcuts (beyond cmd's `?` and `!`) @@ -249,9 +250,8 @@ class CmdLineApp(cmd2.Cmd): shortcuts = dict(cmd2.DEFAULT_SHORTCUTS) shortcuts.update({'&': 'speak'}) - # Set use_ipython to True to enable the "ipy" command which embeds and interactive IPython shell - super().__init__(use_ipython=False, multiline_commands=['orate'], shortcuts=shortcuts) - + super().__init__(multiline_commands=['orate'], shortcuts=shortcuts) + # Make maxrepeats settable at runtime self.add_settable(cmd2.Settable('maxrepeats', int, 'max repetitions for speak command')) |