Debugger: Make Python's subprocess dependency optional

This is only used to display array data using gnuplot.

Task-Number: QTCREATORBUG-10205
Change-Id: I9a9173860e4f6d37f475c7f101c0e85d104ab10a
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-09-24 14:39:41 +02:00
parent 4f9991e68c
commit dcccb90f74
2 changed files with 10 additions and 5 deletions
+9 -4
View File
@@ -83,10 +83,15 @@ def hasPlot():
fileName = "/usr/bin/gnuplot"
return os.path.isfile(fileName) and os.access(fileName, os.X_OK)
def arrayForms():
if hasPlot():
return "Normal,Plot"
return "Normal"
try:
import subprocess
def arrayForms():
if hasPlot():
return "Normal,Plot"
return "Normal"
except:
def arrayForms():
return "Normal"
def bytesToString(b):
+1 -1
View File
@@ -12,7 +12,6 @@ except:
import inspect
import os
import os.path
import subprocess
import sys
import tempfile
import traceback
@@ -1530,6 +1529,7 @@ class Dumper(DumperBase):
stdin=subprocess.PIPE)
gnuplotPid[iname] = gnuplotPipe[iname].pid
f = gnuplotPipe[iname].stdin;
# On Ubuntu install gnuplot-x11
f.write("set term wxt noraise\n")
f.write("set title 'Data fields'\n")
f.write("set xlabel 'Index'\n")