From 2ea9658fae7ce882bfc3266415fb634c79b4db09 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Sat, 9 Mar 2019 19:38:22 -0500 Subject: Replaced StdSim.__store_output with StdSim.pause_storage --- cmd2/pyscript_bridge.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd2/pyscript_bridge.py') 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 -- cgit v1.2.1