Env var GNUPLOT overrides gnuplot path.
By default 'gnuplot' will be searched from the system path.
This commit is contained in:
parent
a7f0f5ea50
commit
80ca8cb2ef
11
gitstats
11
gitstats
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) 2007 Heikki Hokkanen <hoxu@users.sf.net>
|
||||
# Copyright (c) 2007-2008 Heikki Hokkanen <hoxu@users.sf.net>
|
||||
# GPLv2
|
||||
import subprocess
|
||||
import datetime
|
||||
@ -10,13 +10,18 @@ import shutil
|
||||
import sys
|
||||
import time
|
||||
|
||||
GNUPLOT = 'c:/tools/gnuplot/bin/wgnuplot_pipes.exe'
|
||||
GNUPLOT_COMMON = 'set terminal png transparent\nset size 0.5,0.5\n'
|
||||
|
||||
exectime_internal = 0.0
|
||||
exectime_external = 0.0
|
||||
time_start = time.time()
|
||||
|
||||
# By default, gnuplot is searched from path, but can be overridden with the
|
||||
# environment variable "GNUPLOT"
|
||||
gnuplot_cmd = 'gnuplot'
|
||||
if 'GNUPLOT' in os.environ:
|
||||
gnuplot_cmd = os.environ['GNUPLOT']
|
||||
|
||||
def getpipeoutput(cmds, quiet = False):
|
||||
def beautify_name(cmds):
|
||||
ret = cmds[0]
|
||||
@ -807,7 +812,7 @@ plot 'lines_of_code.dat' using 1:2 w lines
|
||||
os.chdir(path)
|
||||
files = glob.glob(path + '/*.plot')
|
||||
for f in files:
|
||||
out = getpipeoutput((GNUPLOT + ' "%s"' % f,))
|
||||
out = getpipeoutput((gnuplot_cmd + ' "%s"' % f,))
|
||||
if len(out) > 0:
|
||||
print out
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user