3 from subprocess import Popen, PIPE
4 from sys import argv, stderr, exit
9 stderr.write("Usage: %s <src_file> <dst_file>\n" % argv[0])
12 with open(argv[1], 'rb') as fsrc:
13 subproc = Popen("gnuplot", shell=True, stdin=PIPE)
14 subproc.stdin.write("set terminal pdf\nset output '%s'\n" % argv[2])
15 shutil.copyfileobj(fsrc, subproc.stdin)
16 subproc.stdin.write("exit\n")