supressing Python stdout

This commit is contained in:
Anthony Scopatz 2015-08-11 23:26:22 -04:00
parent d6381e1897
commit eed44c6791

View file

@ -119,7 +119,8 @@ class BaseShell(object):
return return
hist = builtins.__xonsh_history__ hist = builtins.__xonsh_history__
ts1 = None ts1 = None
tee = Tee() tee = Tee() if builtins.__xonsh_env__.get('XONSH_STORE_STDOUT', False) \
else io.StringIO()
try: try:
ts0 = time.time() ts0 = time.time()
self.execer.exec(code, mode='single', glbs=self.ctx) # no locals self.execer.exec(code, mode='single', glbs=self.ctx) # no locals