From eed44c6791595ff40c42dbdb2c8fac3cc0e1a18f Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 11 Aug 2015 23:26:22 -0400 Subject: [PATCH] supressing Python stdout --- xonsh/base_shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xonsh/base_shell.py b/xonsh/base_shell.py index 5bcfb2f35..b71795cec 100644 --- a/xonsh/base_shell.py +++ b/xonsh/base_shell.py @@ -119,7 +119,8 @@ class BaseShell(object): return hist = builtins.__xonsh_history__ ts1 = None - tee = Tee() + tee = Tee() if builtins.__xonsh_env__.get('XONSH_STORE_STDOUT', False) \ + else io.StringIO() try: ts0 = time.time() self.execer.exec(code, mode='single', glbs=self.ctx) # no locals