Skip to content

Commit 94fa1e7

Browse files
BUG FIX: gnuplot not found resolved
1 parent 9c09a0c commit 94fa1e7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cf/util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def print_head(key, color='cyan'):
6565
def plotterm(x,y):
6666
x=np.array(x)
6767
y=np.array(y)
68-
gnuplot = subprocess.Popen(["/usr/bin/gnuplot"], stdin=subprocess.PIPE)
68+
path_gnuplot = subprocess.run(['which', 'gnuplot'], stdout=subprocess.PIPE).stdout.decode('utf-8').strip()
69+
print(path_gnuplot)
70+
gnuplot = subprocess.Popen([path_gnuplot], stdin=subprocess.PIPE)
6971
gnuplot.stdin.write(bytes("set term dumb 100 30\n", "utf-8"))
7072
gnuplot.stdin.write(bytes("set xdata time;\n", "utf-8"))
7173
gnuplot.stdin.write(bytes("set timefmt \"%d%m%Y\"\n", "utf-8"))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
install_requires=['requests','prettytable','bs4','colorama','numpy','mdv','html2text','gnuplotlib','termgraph','yaspin'],
1717
python_requires='>=3.6',
1818
requires=['requests','prettytable','bs4','colorama','numpy','mdv','html2text','gnuplotlib','termgraph','yaspin'],
19-
version='1.0.4',
19+
version='1.0.5',
2020
url='https://github.com/prasoonbatham11/cfcli',
2121
license='MIT',
2222
author='Prasoon Batham',

0 commit comments

Comments
 (0)