From 7022d739708b230585115964b7e9392af683b0c5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 26 Jan 2015 09:02:34 +0100 Subject: [PATCH] Dumper: Avoid output of plotting subprocess on console Change-Id: I2e1cfc95b556b7d0c2fc1770523d43159790aae1 Reviewed-by: hjk --- share/qtcreator/debugger/dumper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 19affbe02c9..8622bbf4d15 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -89,8 +89,9 @@ except: matplotFigure = {} matplotCount = 0 +devNull = open(os.devnull) matplotProc = subprocess.Popen(args=[pythonExecutable, "-i"], - bufsize=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + bufsize=0, stdin=subprocess.PIPE, stdout=devNull, stderr=devNull) matplotProc.stdin.write(b"import sys\n") matplotProc.stdin.write(b"sys.ps1=''\n") @@ -132,6 +133,7 @@ def matplotSend(iname, show, data): def matplotQuit(): matplotProc.stdin.write(b"exit") matplotProc.kill() + devNull.close() def arrayForms(): global hasPlot