Controlling gnuplot via subprocess.Popen

Peter Beattie Peter.Beattie at web.de
Wed Apr 25 19:37:03 CEST 2007


I am trying to plot something in gnuplot 4.2 using co-ordinates a Python
2.5 program computes. Here's what I'm doing:

py> from subprocess import *
py> plot = Popen("c:/progs/gp/bin/wgnuplot.exe", stdin=PIPE)
py> plot.stdin.write("plot x*x")

The first command dutifully opens gnuplot, but the second doesn't do
anything. Could someone favour me with an explanation as to the whyness?

-- 
Peter



More information about the Python-list mailing list