summaryrefslogtreecommitdiff
path: root/cmd2/pyscript_bridge.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-03-09 19:38:22 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-03-09 19:38:22 -0500
commit2ea9658fae7ce882bfc3266415fb634c79b4db09 (patch)
tree0b402c1b18115c35d1ae8a9653d9594d280a2dac /cmd2/pyscript_bridge.py
parentc2d1de68d247668f55523582b35849d8c61b2144 (diff)
downloadcmd2-git-2ea9658fae7ce882bfc3266415fb634c79b4db09.tar.gz
Replaced StdSim.__store_output with StdSim.pause_storage
Diffstat (limited to 'cmd2/pyscript_bridge.py')
-rw-r--r--cmd2/pyscript_bridge.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py
index d2e52a30..f3ce841d 100644
--- a/cmd2/pyscript_bridge.py
+++ b/cmd2/pyscript_bridge.py
@@ -34,14 +34,15 @@ class CommandResult(namedtuple_with_defaults('CommandResult', ['stdout', 'stderr
In some cases, the data member may contain everything needed for a command and storing stdout
and stderr might just be a duplication of data that wastes memory. In that case, the StdSim can
- be told not to store output with its set_store_output() method.
+ be told not to store output with its pause_storage member. While this member is True, any output
+ sent to StdSim won't be saved in its buffer.
The code would look like this:
if isinstance(self.stdout, StdSim):
- self.stdout.set_store_output(False)
+ self.stdout.pause_storage = True
if isinstance(sys.stderr, StdSim):
- sys.stderr.set_store_output(False)
+ sys.stderr.pause_storage = True
See StdSim class in utils.py for more information