From 957137a886e76f5b32f62f667673a72a813f8c0d Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Tue, 2 Oct 2018 23:14:35 -0400 Subject: Default cmd_echo to True in PyscriptBridge so things like 'py app.help()' will show output --- cmd2/pyscript_bridge.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmd2/pyscript_bridge.py') diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py index b66fd701..9d865b6b 100644 --- a/cmd2/pyscript_bridge.py +++ b/cmd2/pyscript_bridge.py @@ -247,7 +247,7 @@ class PyscriptBridge(object): def __init__(self, cmd2_app): self._cmd2_app = cmd2_app self._last_result = None - self.cmd_echo = False + self.cmd_echo = True def __getattr__(self, item: str): """ @@ -271,10 +271,10 @@ class PyscriptBridge(object): raise AttributeError("'{}' object has no attribute '{}'".format(self._cmd2_app.pyscript_name, item)) def __dir__(self): - """Return a custom set of attribute names to match the available commands""" - commands = list(self._cmd2_app.get_all_commands()) - commands.insert(0, 'cmd_echo') - return commands + """Return a custom set of attribute names""" + attributes = self._cmd2_app.get_all_commands() + attributes.insert(0, 'cmd_echo') + return attributes def __call__(self, args: str, echo: Optional[bool]=None) -> CommandResult: """ -- cgit v1.2.1