forked from qt-creator/qt-creator
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:
@@ -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):
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user