summaryrefslogtreecommitdiff
path: root/cmd2/pyscript_bridge.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-04-10 00:18:26 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-04-10 00:18:26 -0400
commit6e56ad2040b20b5a3b62e0f16ae72be7743d667e (patch)
tree06653e37d49295a6666cdd03716cef39c340dca6 /cmd2/pyscript_bridge.py
parentf5c904cda48c03a30b3476f3a40224226391deea (diff)
downloadcmd2-git-6e56ad2040b20b5a3b62e0f16ae72be7743d667e.tar.gz
Pyscript now saves command output during the same period that redirection does
Diffstat (limited to 'cmd2/pyscript_bridge.py')
-rw-r--r--cmd2/pyscript_bridge.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py
index a4eaf308..8f0aaf52 100644
--- a/cmd2/pyscript_bridge.py
+++ b/cmd2/pyscript_bridge.py
@@ -92,6 +92,10 @@ class PyscriptBridge(object):
# This will be used to capture sys.stderr
copy_stderr = StdSim(sys.stderr, echo)
+ # Pause the storing of any output until onecmd_plus_hooks enables it
+ copy_cmd_stdout.pause_storage = True
+ copy_stderr.pause_storage = True
+
self._cmd2_app._last_result = None
try: